* Various improvements in test name / de-duplications
* Reverts to class by class deletion, introduced fast mode that just delete data for mongo
- Speeds up are incredible Executed 1695 of 1713 specs INCOMPLETE (18 PENDING) in 4 mins 19 secs.
* Adds documentation about the deleteEverything
* add support for geoWithin.centerSphere queries via withJSON
* added test for passing array of lat, lng instead of Parse.GeoPoint
* added postgres support
* added more tests
* improved tests and validation
* added more tests
* add failing test to demonstrate that you can't sort on a
field in an object.
* Only validate the base of the field name.
* fix test name
* Only test sort for mongo.
* pg order by nested object
* level 2 test
* Factor out operation to get a field's base name. Add comment.
* tweak comment wording so it wont make my grammar teacher angry.
* adding nor to specialQuerykeys
* adding nor suport
* adding test
* CRLF
* adding postgres NOR
* adding nor validation
* adding NOR test
* adding test amd fixing NOR cases
* revert the nor logic
* feat: Convert $regex value to RegExp object
* feat: Add lib folder
* Revert "feat: Add lib folder"
This reverts commit c9dfbcbf699ff220baeb2df5586a944d19808e5e.
* feat: Add $regex test in $all array
* test: Test regex with $all only in MongoDB
* Revert "test: Test regex with $all only in MongoDB"
This reverts commit d7194c7869dee98d924fbc2502593a198385dba1.
* feat: Add tests for containsAllStartingWith
* feat: Add postgres support
Thanks to @dplewis
* feat: Check that all values in $all must be regex or none
* test: Check that $all vaules must be regex or none
* feat: Update tests to use only REST API
* refactor: Move $all regex check to adapter
* feat: Check for valid $all values in progres
* refactor: Update function name
* fix: Postgres $all values regex checking
* fix: Check starts with as string
* fix: Define contains all regex sql function
* fix: Wrong value check
* fix: Check valid data
* fix: Check regex when there is only one value
* fix: Constains all starting with string returns empty with bad params
* fix: Pass correct regex value
* feat: Add missing tests
* feat: Add missing tests
* feat: Add more tests
* fix: Unify MongoDB and PostgreSQL functionality
* fix: Lint checks
* fix: Test broken
$regex in $all list must be { $regex: "string" }
* test for empty $all
* Fixes issue related to flow types
* Improves type inference on where clause, index
* run parse-server start on liveQueryServer only on mongo, state leaks on postgres
* Fix "undefined property '__op'" in postgres update
This causes a TypeError which becomes a regular Error,
before the update can be issued. (I think)
This happens when there is an object schema,
and there is also an unrelated field in originalUpdate
which is null or undefined.
e.g. when 'location' is a mandatory object in postgres,
and 'middleName' is an optional string,
PostgresStorageAdapter would throw when a query similar
to the below was performed:
(Object.keys(originalUpdate) would include "middleName" as a value of `k`)
query.set('location', {'country': 'US'})
query.set('middleName', undefined);
* Fix lint error
* Method to upgrade schemas in Postgres;
Adds:
- schemaUpgrade method which check the fields to add and delete from old schema;
* Remove the columns delete in schemaUpgrade method;
* ESLint fix and PostgresStorageAdapter.schemaUpgrade spec test
Adds:
- Add PostgresStorageAdapter.schemaUpgrade spec tests: creates a table,
simulates the addition of a new field and checks if its present in the database
Chores:
- ESLint eol-last fix;
* Add check columns before and after schema upgrade, and remove the unnecessary piece of code
Add:
- Check the right columns is present before schema upgrade and the new field is not,
then check if the right columns is present and the new field;
Remove:
- Piece of code unnecessary because it not need to remove diff columns;
* Optimize the schemaUpgrade method following @vitaly-t instructions, and more tests;
* If the class does not have any columns and needs an upgrade the code would
return without doing so. Fixed this.
Chore:
- Allows class with no column to be upgraded;
- Test for class with no columns being upgraded;
* Update PostgresStorageAdapter.js
rewriting method schemaUpgrade
* Update PostgresStorageAdapter.spec.js
* Update PostgresStorageAdapter.spec.js
* cosmetics
* making nicer promise pattern + if->else blocks
* removing return if unwanted data from an `UPDATE`
* Update PostgresStorageAdapter.js
* Update PostgresStorageAdapter.js
* Update PostgresStorageAdapter.js
Restoring the `UPDATE` result, as apparently it is in fact used. Ouch! 😄
* Update PostgresStorageAdapter.js
* Introduces flow types for storage
* Better typing of QueryOptions
* Adds flow types to SchemaCOntroller,
- runs flow on pre tests
- fixes flow
* Adds ClassLevelPermissions type
* Moves Controller types into a single file
* Changes import styles
* Changes import styles
* fixing method setIndexesWithSchemaFormat (#4454)
Fixing invalid database code in method `setIndexesWithSchemaFormat`:
* It must be a transaction, not a task, as it executes multiple database changes
* It should contain the initial queries inside the transaction, providing the context, not outside it;
* Replaced the code with the ES6 Generator notation
* Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters
* nits
* Fixes tests, improves flow typing
* refactoring method createClass
Removing error-analysis conditions that are irrelevant, i.e. since we are only returning the batch, the error will always have `data` set to the size of the input array, as per [the library's API](http://vitaly-t.github.io/spex/errors.BatchError.html).
* Update PostgresStorageAdapter.js
removing the use of the default separator.
* Refactoring method `addFieldIfNotExists`
* Using ES6 Generators syntax
* Passing in the context into method `createClass`, to reuse the connection
* Extending method `createClass` to reuse connections
* Update PostgresStorageAdapter.js
forgot: extending method `createClass` to reuse the connection.
* Update PostgresStorageAdapter.js
fixing the re-throw logic.
Method `setClassLevelPermissions` should use `.task` to share the connection for the two consecutive operations. It doesn't need a transaction, because the first operation does not need to roll back when the second one fails.
* Refactoring method createTable
Replacing the weird task + transaction chain, by replacing it with just one transaction that encapsulates the complete logic.
* Update PostgresStorageAdapter.js
correcting the sequence to match the original exactly.
* Update PostgresStorageAdapter.js
Nesting the transaction inside a task, so it can execute successfully no matter if the containing task succeeds or fails.
* Update PostgresStorageAdapter.js
adding the missing bracket.
Fixing invalid database code in method `setIndexesWithSchemaFormat`:
* It must be a transaction, not a task, as it executes multiple database changes
* It should contain the initial queries inside the transaction, providing the context, not outside it;
* Replaced the code with the ES6 Generator notation
* Removing the use of batch, as the value of the result promise is irrelevant, only success/failure that matters
* refactoring database code
Starting to refactor the database code for better use of promises + ES6 generators, to prepare for ES7 await/async.
* Update PostgresStorageAdapter.js
* Update PostgresStorageAdapter.js
naming the transaction.
* Add Indexes to Schema API
* error handling
* ci errors
* postgres support
* full text compound indexes
* pg clean up
* get indexes on startup
* test compound index on startup
* add default _id to index, full Text index on startup
* lint
* fix test
* Add handleShutdown Test of MongoStorageAdapter.
* Add `handleShutdown` function in PostgresStorageAdapter, with it's test.
* Replace the _pgp to _client
* Use `adapter._client.$pool.ending` to ckeck is ending
* Add `handleShutdown()` in ParseServer.spec.js
* Trigger
* Set Server to Default
* Support for Aggregate Queries
* improve pg and coverage
* Mongo 3.4 aggregates and tests
* replace _id with objectId
* improve tests for objectId
* project with group query
* typo
* Makes InstallationRouter like others
* Adds testing for Range file requests
- Fixes issue with small requests (0-2)
* Revert "Makes InstallationRouter like others"
This reverts commit e2d2a16ebf2757db6138c7b5b33c97c56c69ead6.
* Better handling of errors in FilesRouter
* Fix incorrectness in range requests
* Better/simpler logic
* Only on mongo at it requires Gridstore
* Open file streaming to all adapters supporting it
* Improves coverage of parsers
* Ensures depreciation warning is effective
* Removes unused function
* de-duplicate logic
* Removes necessity of overriding req.params.className on subclasses routers
* Use babel-preset-env to ensure min-version compatible code
* removes dead code
* Leverage indexes in order to infer which field is duplicated upon signup
- A note mentioned that it would be possible to leverage using the indexes on username/email to infer which is duplicated
* Small nit
* Better template to match column name
* Restores original implementation for safety
* nits
* Not sure how this got introduced without lint catching either in the upgrade of a lib or a pr on these files, but innocuous enough that i don't think we need to investigate further?
* Update eslint to make all happy!
* Added type polygon to schema
* refactoring and more tests
* fix tests
* update test and transform
* add support for polygonContains
* fix transform.mongoObjectToParseObject test
* add indexes for polygon
* index test
* postgres test fix
* remove invalid loop test
* add invalid loop test
* nit