|
5 | 5 | },
|
6 | 6 | "Class Definition with super": {
|
7 | 7 | "prefix": "Class",
|
8 |
| - "body": ["Class $1 Extends ${2:%Persistent}", "{", "$0", "}"] |
| 8 | + "body": ["Class $1 Extends ${2|%Persistent,%SerialObject,%RegisteredObject|}", "{", "$0", "}"] |
9 | 9 | },
|
10 | 10 | "ClassMethod definition": {
|
11 |
| - "prefix": "ClassMethod", |
12 |
| - "body": ["ClassMethod $1($2) As ${3:%Status}", "{", "\t$0", "}"] |
| 11 | + "prefix": "ClassMethod", |
| 12 | + "body": ["ClassMethod $1($2) As ${3:%Status}", "{", "\tset $4 = \\$\\$\\$OK", "\t$0", "\treturn $4","}"] |
13 | 13 | },
|
14 | 14 | "Method definition": {
|
15 |
| - "prefix": "Method", |
16 |
| - "body": ["Method $1($2) As ${3:%Status}", "{", "\t$0", "}"] |
| 15 | + "prefix": "Method", |
| 16 | + "body": ["Method $1($2) As ${3:%Status}", "{", "\tset $4 = \\$\\$\\$OK", "\t$0", "\treturn $4", "}"] |
17 | 17 | },
|
18 | 18 | "Property": {
|
19 |
| - "prefix": "property", |
| 19 | + "prefix": "Property", |
20 | 20 | "body": "Property $1 As ${2:%String};"
|
21 | 21 | },
|
| 22 | + "Unique Property": { |
| 23 | + "prefix": ["Unique", "Property"], |
| 24 | + "body": ["Property $1 As ${2:%String};", "", "Index $1Index On $1 [Unique];"] |
| 25 | + }, |
| 26 | + "Always-Computed Property": { |
| 27 | + "prefix": ["Computed", "Property"], |
| 28 | + "body" : ["Property $1 As ${2:%String} [Calculated, SqlComputed, SqlComputeCode =", "{set {$1} = {$3}}];"] |
| 29 | + }, |
| 30 | + "Date/Time Property": { |
| 31 | + "prefix": ["Date", "Time", "Property"], |
| 32 | + "body" : ["Property $1 as ${2|%Date,%Time|}(MINVAL = $3, MAXVAL = $4);"] |
| 33 | + }, |
22 | 34 | "Parameter": {
|
23 | 35 | "prefix": "Parameter",
|
24 | 36 | "body": "Parameter $1 = \"$0\";"
|
|
28 | 40 | "body": "Index $1 On ${2:Name};"
|
29 | 41 | },
|
30 | 42 | "Unique Index": {
|
31 |
| - "prefix": "Index", |
32 |
| - "body": "Index $1 On ${2:property} [Unique];", |
33 |
| - "description": "Unique Index" |
34 |
| - }, |
35 |
| - "Query": { |
36 |
| - "prefix":["Query"], |
37 |
| - "body":["Query $1($2) As %SQLQuery [ SqlProc ]","{","\t$3","}"], |
38 |
| - "description": "Based on SQL statement" |
39 |
| - }, |
40 |
| - "Trigger": { |
41 |
| - "prefix": "Trigger", |
42 |
| - "body": [ |
| 43 | + "prefix": "Index", |
| 44 | + "body": "Index $1 On ${2:property} [Unique];", |
| 45 | + "description": "Unique Index" |
| 46 | + }, |
| 47 | + "Query": { |
| 48 | + "prefix":["Query"], |
| 49 | + "body":["Query $1($2) As %SQLQuery [ SqlProc ]","{","\tSELECT $3", "\tFROM $4", "\tWHERE $5", "\tORDER BY $6", "}"], |
| 50 | + "description": "SQL statement" |
| 51 | + }, |
| 52 | + "Trigger": { |
| 53 | + "prefix": "Trigger", |
| 54 | + "body": [ |
43 | 55 | "Trigger $1 [Event=${2|INSERT,UPDATE,DELETE|}, Time=${3|BEFORE,AFTER|}, Foreach=${4|row/object,row,statement|}]",
|
44 | 56 | "{",
|
45 | 57 | "\t$5",
|
46 | 58 | "}"
|
47 | 59 | ],
|
48 |
| - "description": "Trigger" |
49 |
| - }, |
50 |
| - "ForeignKey": { |
51 |
| - "prefix": "Foreignkey", |
52 |
| - "body": "ForeignKey $1 (${2:property}) References ${3:referencedClass}(${4:refIndex});", |
53 |
| - "description": "ForeignKey" |
54 |
| - }, |
55 |
| - "Relationship": { |
56 |
| - "prefix": ["Relationship"], |
57 |
| - "body": "Relationship $1 As ${2:classname} [ Cardinality = ${3|one,many,parent,children|}, Inverse = ${4:correspondingProperty} ];", |
58 |
| - "description": "Relationship" |
| 60 | + "description": "Trigger" |
| 61 | + }, |
| 62 | + "ForeignKey": { |
| 63 | + "prefix": "Foreignkey", |
| 64 | + "body": "ForeignKey $1 (${2:property}) References ${3:referencedClass}(${4:refIndex});", |
| 65 | + "description": "ForeignKey" |
| 66 | + }, |
| 67 | + "Relationship": { |
| 68 | + "prefix": ["Relationship"], |
| 69 | + "body": "Relationship $1 As ${2:classname} [ Cardinality = ${3|one,many,parent,children|}, Inverse = ${4:correspondingProperty} ];", |
| 70 | + "description": "Relationship" |
59 | 71 | },
|
60 | 72 | "BusinessService": {
|
61 | 73 | "prefix": ["BusinessService","Interoperability"],
|
|
0 commit comments