xml version encoding UTF-8 backend model name project name class field

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="UTF-8"?>
<backend>
<model>
<name>project</name>
<class>
<fields>
<field>
<name>id</name>
<type>protected</type>
<default>0</default>
</field>
<field>
<name>title</name>
<type>protected</type>
<default></default>
</field>
</fields>
<methods>
<method>
<name>get</name>
<type>public</type>
<params>
<param>
<name>id</name>
<type>int</type>
</param>
</params>
<queries>
<query>SELECT id, title FROM `project` WHERE id = %s;</query>
</queries>
<return>QUERY_RESULT[1]</return>
</method>
<method>
<name>add</name>
<type>public</type>
<params>
<param>
<name>id</name>
<type>int</type>
</param>
<param>
<name>title</name>
<type>string</type>
</param>
</params>
<queries>
<query>INSERT INTO `project` (`%s`) VALUES (%s);</query>
<query>UPDATE `project` SET `counts` = `counts` + 1;</query>
</queries>
<return>id</return>
</method>
<method>
<name>del</name>
<type>public</type>
<params>
<param>
<name>id</name>
<type>int</type>
</param>
</params>
<queries>
<query>DELETE FROM `project` WHERE id = %s;</query>
</queries>
<return>QUERY[2]</return>
</method>
</methods>
</class>
</model>
</backend>