-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Postgres: Operations, Hooks, OAuth login, Files support #2528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
flovilmart
commented
Aug 15, 2016
- Remove flaky tests on recursive roles load
@flovilmart updated the pull request. |
Current coverage is 92.20% (diff: 98.30%)@@ master #2528 diff @@
==========================================
Files 96 97 +1
Lines 10892 11814 +922
Methods 1345 1454 +109
Messages 0 0
Branches 1759 1906 +147
==========================================
+ Hits 10013 10893 +880
- Misses 879 921 +42
Partials 0 0
|
@flovilmart updated the pull request. |
@@ -412,7 +454,20 @@ export class PostgresStorageAdapter { | |||
// Drops a collection. Resolves with true if it was a Parse Schema (eg. _User, Custom, etc.) | |||
// and resolves with false if it wasn't (eg. a join table). Rejects if deletion was impossible. | |||
deleteClass(className) { | |||
return notImplemented(); | |||
return this.getClass(className).then((schema) => { | |||
let joins = joinTablesForSchema(schema); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't parse server drop the join tables automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm that can be simplified !
@flovilmart updated the pull request - view changes |
@@ -1,2 +1,2 @@ | |||
instrumentation: | |||
excludes: ["**/spec/**", "**/PostgresStorageAdapter.js"] | |||
excludes: ["**/spec/**"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay let's start covering dat!
@flovilmart updated the pull request. |
@flovilmart updated the pull request. |
b84fc4a
to
4da26f2
Compare
// Table already exists, must have been created by a different request. Ignore error. | ||
} else { | ||
throw error; | ||
} | ||
}).then(() => { | ||
// Create the relation tables | ||
return Promise.all(relations.map((fieldName) => { | ||
return this._client.none('CREATE TABLE IF NOT EXISTS $<joinTable:name> ("relatedId" varChar(120), "owningId" varChar(120), PRIMARY KEY("relatedId", "owningId") )', {joinTable: `_Join:${fieldName}:${className}`}) | ||
return this._client.none('CREATE TABLE IF NOT EXISTS $<joinTable:name> ("relatedId" varChar(120), "owningId" varChar(120), PRIMARY KEY("relatedId", "owningId") )', {joinTable: `_Join:${fieldName}:${className}`}).catch(err => { | ||
console.error('ERROR CREATING JOIN!') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You sure we want to squelch this error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I don't want to :p
@flovilmart updated the pull request - view changes |
@flovilmart updated the pull request - view changes |
* ParsePlatform/master: (100 commits) Only allow basic auth credentials with a known appId (parse-community#2574) vk.com provider registered (parse-community#2579) chore(package): update parse-server-push-adapter to version 1.1.0 (parse-community#2588) vk.com auth data manager implemented (parse-community#2578) Fix a typo (parse-community#2563) Makes sure routes don't overlap and yield a header set error (parse-community#2559) Postgres: $all, $and CLP and more (parse-community#2551) Changelog 2.2.18 (parse-community#2558) chore(package): update winston-daily-rotate-file to version 1.3.0 (parse-community#2547) chore(package): update parse-server-s3-adapter to version 1.0.5 (parse-community#2536) Adds bcrypt native binding for better login performance (parse-community#2549) chore(package): update mongodb to version 2.2.7 (parse-community#2554) Make parse-server cloud code logging closer parse.com legacy (parse-community#2550) chore(package): update pg-promise to version 5.3.1 (parse-community#2519) Postgres: Operations, Hooks, OAuth login, Files support (parse-community#2528) Syncing afterSave/afterDelete trigger calls (Issue parse-community#2489) (parse-community#2499) Updated README.md (parse-community#2538) Fix capitalization, typo, and grammar mistake (parse-community#2533) Update ISSUE_TEMPLATE.md fix typo (parse-community#2525) ...