Skip to content

Commit 7791345

Browse files
make examples === for speeeed
1 parent 09c76d8 commit 7791345

11 files changed

+113
-86
lines changed

machines/begin-transaction.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ module.exports = {
3737
extendedDescription: 'Until it is committed, rolled back, or times out, subsequent queries run on this connection will be transactional. They will not have any true effect on the database until the transaction is committed, and will not affect queries made on other connections.',
3838
outputVariableName: 'report',
3939
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
40-
example: {
41-
meta: '==='
42-
}
40+
example: '==='
41+
// example: {
42+
// meta: '==='
43+
// }
4344
},
4445

4546
badConnection: {
@@ -48,9 +49,10 @@ module.exports = {
4849
extendedDescription: 'Usually, this means the connection to the database was lost due to a logic error or timing issue in userland code. In production, this can mean that the database became overwhelemed or was shut off while some business logic was in progress.',
4950
outputVariableName: 'report',
5051
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
51-
example: {
52-
meta: '==='
53-
}
52+
example: '==='
53+
// example: {
54+
// meta: '==='
55+
// }
5456
}
5557

5658
},

machines/commit-transaction.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ module.exports = {
4040
extendedDescription: 'Subsequent queries on this connection will no longer be transactional unless a new transaction is begun.',
4141
outputVariableName: 'report',
4242
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
43-
example: {
44-
meta: '==='
45-
}
43+
example: '==='
44+
// example: {
45+
// meta: '==='
46+
// }
4647
},
4748

4849
badConnection: {
@@ -51,9 +52,10 @@ module.exports = {
5152
extendedDescription: 'Usually, this means the connection to the database was lost due to a logic error or timing issue in userland code. In production, this can mean that the database became overwhelemed or was shut off while some business logic was in progress.',
5253
outputVariableName: 'report',
5354
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
54-
example: {
55-
meta: '==='
56-
}
55+
example: '==='
56+
// example: {
57+
// meta: '==='
58+
// }
5759
}
5860

5961
},

machines/compile-statement.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ module.exports = {
2525
description: 'A Waterline statement.',
2626
extendedDescription: 'See documentation for more information. Note that `opts` may be used for expressing driver-specific customizations as a sibling to `from`, `where`, `select`, etc. In other words, recursively deep within a Waterline query statement. This is distinct from `meta`, which contains driver-specific customizations about the statement as a whole.',
2727
moreInfoUrl: 'https://github.com/particlebanana/waterline-query-builder/blob/master/docs/syntax.md',
28-
example: {},
28+
example: '===',
29+
// example: {},
2930
required: true
3031
},
3132

@@ -45,31 +46,34 @@ module.exports = {
4546
description: 'The provided Waterline statement was compiled successfully.',
4647
outputVariableName: 'report',
4748
outputDescription: 'The `nativeQuery` property is the compiled native query for the database. The `meta` property is reserved for custom driver-specific extensions.',
48-
example: {
49-
nativeQuery: '*',
50-
meta: '==='
51-
}
49+
example: '==='
50+
// example: {
51+
// nativeQuery: '*',
52+
// meta: '==='
53+
// }
5254
},
5355

5456
malformed: {
5557
description: 'The provided Waterline statement could not be compiled due to malformed syntax.',
5658
outputVariableName: 'report',
5759
outputDescription: 'The `error` property is a JavaScript error instance explaining that (or preferably even _why_) the Waterline syntax is not valid. The `meta` property is reserved for custom driver-specific extensions.',
58-
example: {
59-
error: '===',
60-
meta: '==='
61-
}
60+
example: '==='
61+
// example: {
62+
// error: '===',
63+
// meta: '==='
64+
// }
6265
},
6366

6467
notSupported: {
6568
description: 'The provided Waterline statement could not be compiled because it is not supported by this MySQL driver.',
6669
extendedDescription: 'If even one clause of the Waterline statement is not supported by the MySQL driver, the compilation of the entire statement _always fails_.',
6770
outputVariableName: 'report',
6871
outputDescription: 'The `error` property is a JavaScript error instance explaining that (or preferably even _why_) the Waterline statement is not supported. The `meta` property is reserved for custom driver-specific extensions.',
69-
example: {
70-
error: '===',
71-
meta: '==='
72-
}
72+
example: '==='
73+
// example: {
74+
// error: '===',
75+
// meta: '==='
76+
// }
7377
}
7478

7579
},

machines/create-manager.js

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ module.exports = {
3333
whereToGet: {
3434
url: 'https://gist.github.com/mikermcneil/46d10fd816c980cd3d9f'
3535
},
36-
example: 'mysql://mikermcneil:p4ssw02D@localhost:3306/some_db',
36+
example: '==='
37+
// example: 'mysql://mikermcneil:p4ssw02D@localhost:3306/some_db',
3738
required: true
3839
},
3940

@@ -75,20 +76,22 @@ module.exports = {
7576
'basis; and it may also vary based on the configuration passed into the `meta` input.',
7677
outputVariableName: 'report',
7778
outputDescription: 'The `manager` property is a manager instance that will be passed into `getConnection()`. The `meta` property is reserved for custom driver-specific extensions.',
78-
example: {
79-
manager: '===',
80-
meta: '==='
81-
}
79+
example: '==='
80+
// example: {
81+
// manager: '===',
82+
// meta: '==='
83+
// }
8284
},
8385

8486
malformed: {
8587
description: 'The provided connection string is not valid for MySQL.',
8688
outputVariableName: 'report',
8789
outputDescription: 'The `error` property is a JavaScript Error instance explaining that (and preferably "why") the provided connection string is invalid. The `meta` property is reserved for custom driver-specific extensions.',
88-
example: {
89-
error: '===',
90-
meta: '==='
91-
}
90+
example: '==='
91+
// example: {
92+
// error: '===',
93+
// meta: '==='
94+
// }
9295
},
9396

9497
failed: {
@@ -110,10 +113,11 @@ module.exports = {
110113
'any errors related to bad credentials, connectivity, etc. will not be caught until `getConnection()` is called.',
111114
outputVariableName: 'report',
112115
outputDescription: 'The `error` property is a JavaScript Error instance with more information and a stack trace. The `meta` property is reserved for custom driver-specific extensions.',
113-
example: {
114-
error: '===',
115-
meta: '==='
116-
}
116+
example: '==='
117+
// example: {
118+
// error: '===',
119+
// meta: '==='
120+
// }
117121
}
118122

119123
},

machines/destroy-manager.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ module.exports = {
3333
description: 'The specified manager and all of its active connections were successfully destroyed.',
3434
outputVariableName: 'report',
3535
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
36-
example: {
37-
meta: '==='
38-
}
36+
example: '==='
37+
// example: {
38+
// meta: '==='
39+
// }
3940
},
4041

4142
failed: {
@@ -47,10 +48,11 @@ module.exports = {
4748
'server(s) became overwhelemed or were shut off while some business logic was in progress.',
4849
outputVariableName: 'report',
4950
outputDescription: 'The `error` property is a JavaScript Error instance with more information and a stack trace. The `meta` property is reserved for custom driver-specific extensions.',
50-
example: {
51-
error: '===',
52-
meta: '==='
53-
}
51+
example: '==='
52+
// example: {
53+
// error: '===',
54+
// meta: '==='
55+
// }
5456
}
5557

5658
},

machines/get-connection.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ module.exports = {
3939
extendedDescription: 'This connection should be eventually released. Otherwise, it may time out. It is not a good idea to rely on database connections timing out-- be sure to release this connection when finished with it!',
4040
outputVariableName: 'report',
4141
outputDescription: 'The `connection` property is an active connection to the database. The `meta` property is reserved for custom driver-specific extensions.',
42-
example: {
43-
connection: '===',
44-
meta: '==='
45-
}
42+
example: '==='
43+
// example: {
44+
// connection: '===',
45+
// meta: '==='
46+
// }
4647
},
4748

4849
failed: {
@@ -56,10 +57,11 @@ module.exports = {
5657
' + any other miscellaneous connection error',
5758
outputVariableName: 'report',
5859
outputDescription: 'The `error` property is a JavaScript Error instance explaining that a connection could not be made. The `meta` property is reserved for custom driver-specific extensions.',
59-
example: {
60-
error: '===',
61-
meta: '==='
62-
}
60+
example: '==='
61+
// example: {
62+
// error: '===',
63+
// meta: '==='
64+
// }
6365
}
6466

6567
},

machines/parse-native-query-error.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ module.exports = {
4242
moreInfoUrl: 'https://github.com/node-machine/waterline-driver-interface#footprints',
4343
outputVariableName: 'report',
4444
outputDescription: 'The `footprint` property is the normalized "footprint" representing the provided raw error. Conforms to one of a handful of standardized footprint types expected by the Waterline driver interface. The `meta` property is reserved for custom driver-specific extensions.',
45-
example: {
46-
footprint: {},
47-
meta: '==='
48-
}
45+
example: '==='
46+
// example: {
47+
// footprint: {},
48+
// meta: '==='
49+
// }
4950
},
5051

5152
},

machines/parse-native-query-result.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ module.exports = {
2222
'Either "select", "insert", "destroy", "update", "count", "sum", or "avg". ' +
2323
'This determines how the provided raw result will be parsed/coerced.',
2424
required: true,
25-
example: 'select'
25+
example: '==='
26+
// example: 'select'
2627
},
2728

2829
nativeQueryResult: {
@@ -48,10 +49,11 @@ module.exports = {
4849
description: 'The result was successfully normalized.',
4950
outputVariableName: 'report',
5051
outputDescription: 'The `result` property is the normalized version of the raw result originally provided. The `meta` property is reserved for custom driver-specific extensions.',
51-
example: {
52-
result: '*',
53-
meta: '==='
54-
}
52+
example: '==='
53+
// example: {
54+
// result: '*',
55+
// meta: '==='
56+
// }
5557
},
5658

5759
},

machines/release-connection.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ module.exports = {
3434
extendedDescription: 'The provided connection may no longer be used for any subsequent queries.',
3535
outputVariableName: 'report',
3636
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
37-
example: {
38-
meta: '==='
39-
}
37+
example: '==='
38+
// example: {
39+
// meta: '==='
40+
// }
4041
},
4142

4243
badConnection: {
@@ -45,9 +46,10 @@ module.exports = {
4546
extendedDescription: 'Usually, this means the connection to the database was lost due to a logic error or timing issue in userland code. In production, this can mean that the database became overwhelemed or was shut off while some business logic was in progress.',
4647
outputVariableName: 'report',
4748
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
48-
example: {
49-
meta: '==='
50-
}
49+
example: '==='
50+
// example: {
51+
// meta: '==='
52+
// }
5153
}
5254

5355
},

machines/rollback-transaction.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,18 +40,20 @@ module.exports = {
4040
extendedDescription: 'Subsequent queries on this connection will no longer be transactional unless a new transaction is begun.',
4141
outputVariableName: 'report',
4242
outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.',
43-
example: {
44-
meta: '==='
45-
}
43+
example: '==='
44+
// example: {
45+
// meta: '==='
46+
// }
4647
},
4748

4849
badConnection: {
4950
friendlyName: 'Meta (custom)',
5051
description: 'Additional stuff to pass to the driver.',
5152
extendedDescription: 'This is reserved for custom driver-specific extensions. Please refer to the documentation for the driver you are using for more specific information.',
52-
example: {
53-
meta: '==='
54-
}
53+
example: '==='
54+
// example: {
55+
// meta: '==='
56+
// }
5557
}
5658

5759
},

0 commit comments

Comments
 (0)