@@ -74,77 +74,118 @@ User.driver.getConnection({
74
74
var Waterline = require ( 'machinepack-waterline' ) ;
75
75
76
76
77
-
78
77
// Waterline.connect()
79
78
// Waterline.transaction()
80
79
// Waterline.query()
81
80
82
81
Waterline . connect ( {
83
82
datastore : datastore ,
83
+ during : function ( db , done ) {
84
+ // db.connection;
85
+
86
+ // See below for info on how to use w/ ORM methods.
87
+ return done ( ) ;
88
+ } ,
84
89
meta : { }
85
90
} ) . exec ( /*...*/ ) ;
86
91
87
- Waterline . connect ( {
92
+
93
+ Waterline . transaction ( {
88
94
datastore : datastore ,
95
+ during : function ( T , done ) {
96
+ // T.connection;
97
+
98
+ // See below for info on how to use w/ ORM methods.
99
+ return done ( ) ;
100
+ } ,
89
101
meta : { }
90
102
} ) . exec ( /*...*/ ) ;
91
103
92
- Waterline . transaction ( {
104
+
105
+ // Run radar query
106
+ Waterline . query ( {
93
107
datastore : datastore ,
108
+ statement : { } ,
94
109
meta : { }
95
110
} ) . exec ( /*...*/ ) ;
96
111
97
112
98
113
99
114
115
+ // Probably not yet:
116
+ //
117
+ // // Waterline.sendNativeQuery()
118
+ // // Run native query
119
+ // Waterline.sendNativeQuery({
120
+ // datastore: datastore,
121
+ // nativeQuery: 'SELECT * FROM foo;',
122
+ // meta: {}
123
+ // }).exec(/*...*/);
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+ // ========================================================================
132
+ // NEW MYSQL STUFF:
133
+
100
134
101
- MySQL . getNewConnection ( {
135
+ MySQL . createPool ( {
102
136
connectionString : 'mysql://....' ,
103
137
meta : { }
104
138
} ) . exec ( /*...*/ ) ;
105
139
106
- MySQL . getConnectionFromPool ( {
140
+ MySQL . destroyPool ( {
107
141
pool : pool ,
108
142
meta : { }
109
143
} ) . exec ( /*...*/ ) ;
110
144
111
145
112
- MySQL . releaseConnection ( {
113
- connection : connection ,
146
+
147
+
148
+ MySQL . getConnectionFromPool ( {
149
+ pool : pool ,
114
150
meta : { }
115
151
} ) . exec ( /*...*/ ) ;
116
152
117
153
MySQL . releaseConnectionToPool ( {
118
154
connection : connection ,
119
- pool
120
155
meta : { }
121
156
} ) . exec ( /*...*/ ) ;
122
157
123
158
124
159
125
-
126
- MySQL . getConnectionFromCluster ( {
127
- cluster : cluster ,
160
+ MySQL . createConnection ( {
161
+ connectionString : 'mysql://....' ,
128
162
meta : { }
129
163
} ) . exec ( /*...*/ ) ;
130
- MySQL . releaseConnectionFromCluster ( {
131
- cluster : cluster ,
164
+
165
+ MySQL . destroyConnection ( {
166
+ connection : connection ,
132
167
meta : { }
133
168
} ) . exec ( /*...*/ ) ;
134
169
135
170
136
171
137
172
138
173
139
- MySQL . getNewPool ( {
140
- connectionString : 'mysql://....' ,
141
- meta : { }
142
- } ) . exec ( /*...*/ ) ;
143
174
144
- MySQL . getNewPool ( {
145
- connectionString : 'mysql://....' ,
146
- meta : { }
147
- } ) . exec ( /*...*/ ) ;
175
+
176
+ // Probably not yet:
177
+ //
178
+ // MySQL.getConnectionFromCluster({
179
+ // cluster: cluster,
180
+ // meta: {}
181
+ // }).exec(/*...*/);
182
+ // MySQL.releaseConnectionFromCluster({
183
+ // cluster: cluster,
184
+ // meta: {}
185
+ // }).exec(/*...*/);
186
+
187
+
188
+
148
189
149
190
150
191
0 commit comments