@@ -104,11 +104,11 @@ export class PostgresStorageAdapter {
104
104
} ;
105
105
106
106
classExists ( name ) {
107
- return Promise . reject ( 'Not implemented yet.' )
107
+ return notImplemented ( ) ;
108
108
}
109
109
110
110
setClassLevelPermissions ( className , CLPs ) {
111
- return Promise . reject ( 'Not implemented yet.' )
111
+ return notImplemented ( ) ;
112
112
}
113
113
114
114
createClass ( className , schema ) {
@@ -172,7 +172,7 @@ export class PostgresStorageAdapter {
172
172
// Drops a collection. Resolves with true if it was a Parse Schema (eg. _User, Custom, etc.)
173
173
// and resolves with false if it wasn't (eg. a join table). Rejects if deletion was impossible.
174
174
deleteClass ( className ) {
175
- return Promise . reject ( 'Not implemented yet.' )
175
+ return notImplemented ( ) ;
176
176
}
177
177
178
178
// Delete all data known to this adapter. Used for testing.
@@ -205,7 +205,7 @@ export class PostgresStorageAdapter {
205
205
206
206
// Returns a Promise.
207
207
deleteFields ( className , schema , fieldNames ) {
208
- return Promise . reject ( 'Not implemented yet.' )
208
+ return notImplemented ( ) ;
209
209
}
210
210
211
211
// Return a promise for all schemas known to this adapter, in Parse format. In case the
@@ -298,7 +298,7 @@ export class PostgresStorageAdapter {
298
298
299
299
// Apply the update to all objects that match the given Parse Query.
300
300
updateObjectsByQuery ( className , schema , query , update ) {
301
- return Promise . reject ( 'Not implemented yet.' )
301
+ return notImplemented ( ) ;
302
302
}
303
303
304
304
// Return value not currently well specified.
@@ -349,7 +349,7 @@ export class PostgresStorageAdapter {
349
349
350
350
// Hopefully, we can get rid of this. It's only used for config and hooks.
351
351
upsertOneObject ( className , schema , query , update ) {
352
- return Promise . reject ( 'Not implemented yet.' )
352
+ return notImplemented ( ) ;
353
353
}
354
354
355
355
find ( className , schema , query , { skip, limit, sort } ) {
@@ -427,5 +427,9 @@ export class PostgresStorageAdapter {
427
427
}
428
428
}
429
429
430
+ function notImplemented ( ) {
431
+ return Promise . reject ( new Error ( 'Not implemented yet.' ) ) ;
432
+ }
433
+
430
434
export default PostgresStorageAdapter ;
431
435
module . exports = PostgresStorageAdapter ; // Required for tests
0 commit comments