Commit Graph

38 Commits

Author SHA1 Message Date
Florent Vilmart
c0249283ac Advancements with postgres (#2510)
* Start DB runner from tests

* Connect GridstoreAdapter only when needed

* removes unused package

* better test errors reporting

* Adds support for __op.Delete

* Better test error reporting

* Makes sure all tests can run without crashing

* Use xdescribe to skip test suite

* Removes unused dependencies

* Let volatiles classes be created with PG on start

* Do not fail if class dont exist

* adds index.spec.js to the pg suite

* Use a new config each test to prevent side effects

* Enable EmailVerificationToken specs with pg

* Makes sure failure output is not cut

* Reduces number of ignored tests in ParseObject.spec

* Inspect reconfiguration errors

* Mark GlobalConfig is incompatible with PG

- Problem is with nested updates (param.prop = value)

* PG: Nested JSON queries and updates

- Adds support for nested json and . operator queries
- Adds debug support for PG adapter
- Adds loglevel support in helper

* Enable working specs in ParseUser

* Sets default logLevel in tests to undefined

* Adds File type support, retores purchaseValidation specs

* Adds support for updating jsonb objects

- Restores PushController tests

* Proper implementation of deleteByQuery and ORs

- Adds ParseInstallation spec to the test suite

* xit only failing tests

* Nit on ParseAPI spec

* add sorting operator

* properly bound order keys

* reverts describe_only_db behavior

* Enables passing tests

* Adds basic support for relations, upsertOneObject aliased to createObject

* progress on queries options

* Fix ACL update related problems

* Creates relation tables on class creation

* Adds Relation tests

* remove flaky tests

* use promises instead of CB

* disable flaky test

* nits

* Fixes on schema spec

- Next thing is to implemenet geopoint and files correctly

* fix failues

* Basic GeoPoint support

* Adds support for $nearSphere/$maxDistance geopoint queries

* enable passing tests

* drop tables afterEach for PG, clean up relation tables too

* Better initialization/dropTables
2016-08-15 16:48:39 -04:00
Florent Vilmart
09bd9e3b2c Adds schema caching capabilities (5s by default) (#2286)
* Adds schema caching capabilities (off by default)

* Use InMemoryCacheAdapter

* Uses proper adapter to generate a cache

* Fix bugs when running disabled cache

* nits

* nits

* Use options object instead of boolean

* Imrpove concurrency of loadSchema

* Adds testing with SCHEMA_CACHE_ON

* Use CacheController instead of generator

- Makes caching SchemaCache use a generated prefix
- Makes clearing the SchemaCache clear only the cached schema keys
- Enable cache by default (ttl 5s)
2016-07-22 21:23:59 -07:00
Drew
ab06055369 Postgres exclude failing tests (#2081)
* reload the right data

More passing postgres tests

Handle schema updates, and $in for non array columns

remove authdata from user and implement ensureUniqueness

Make some tests work, detect existing classes

Throw proper error for unique index violation

fix findOneAndUpdate

Support more types

support more type

Support boolean, fix _rperm/_wperm, add TODO

Support string types and also simplify tests

Move operator flattening into Parse Server and out of mongo adapters

Move authdata transform for create into Parse Server

Move authdata transforms completely in to Parse Server

Fix test setup

inline addSchema

Inject default schema to response from DB adapter

* Mark tests that don't work in Postgres

* Exclude one more test

* Exclude some more failing tests

* Exclude more tests
2016-06-17 12:59:16 -04:00
Drew
0ff35e18f0 Add more postgres support (#2080)
* reload the right data

More passing postgres tests

Handle schema updates, and $in for non array columns

remove authdata from user and implement ensureUniqueness

Make some tests work, detect existing classes

Throw proper error for unique index violation

* fix findOneAndUpdate
2016-06-16 15:39:05 -07:00
Drew
726c866a4d Remove console.log 2016-06-15 17:25:17 -07:00
Drew Gross
a69a88f3a4 Fix some stuff 2016-06-15 13:11:51 -07:00
Florent Vilmart
e7e2369132 Fixes for Class Level and Pointer Permissions (#1989)
* Fixes for Pointer Permissions

- Fix bug that would leave public CLP when setting a new set of permissions
- Sets empty permissions if missing to match parse.com API
- Updates tests to reflect changes

* Adds regression test for #1991

* Fit -> It
2016-06-06 09:31:50 -07:00
Jeremy Pease
fab8cfdfc7 Add additional default fields to _Installation class (#1852)
Fields are appVersion, appName, appIdentifier, and parseVersion.
These fields are sent by Android and iOS SDKs.
2016-05-20 18:15:47 -07:00
Drew Gross
a926712951 Start using parse format schema in transformQueryKeyValue 2016-04-26 10:12:45 -07:00
Drew
0d094767cf Cleanup update (#1590)
* destructuring in DB controller

* deleteObject in db adapter

* Turns out we can't have delete by object ID because of ACLs...

* Fix tests

* destructure acl

* Don't reject with object
2016-04-22 17:05:21 -04:00
Drew
61b62e4e9f Rename Schema => SchemaController (#1542)
* Rename Schema to SchemaController

* Rename Schema => SchemaController

* Move to controllers folder

* Move SchemasController to Controllers folder

* remove ./..
2016-04-18 18:59:57 -07:00
Drew
512251eb58 Move field deletion logic into mongo adapter (#1471) 2016-04-12 22:06:58 -04:00
Florent Vilmart
c050a65d49 Schema.js database agnostic (#1468)
* Schema.js database agnostic

* nits
2016-04-12 17:39:27 -04:00
Drew
91ace4e718 Progres towards moving mongo logic into its adapter 2016-04-05 21:16:39 -07:00
Drew Gross
963811d022 Handle legacy _client_permissions key in _SCHEMA. Fixes #888. 2016-03-07 13:44:45 -08:00
Marco129
908a4eb643 Fix delete relation field when _Join collection not exist 2016-03-06 17:22:36 +08:00
Nikita Lutsenko
295d361725 Convert Schema.js to ES6 class. 2016-03-04 01:05:49 -08:00
Nikita Lutsenko
9a7264100c Merge pull request #794 from ParsePlatform/nlutsenko.schemasRouter
Completely migrate SchemasRouter to new MongoCollection API.
2016-03-03 14:55:54 -08:00
Marco129
50735c4cbb Fix update system schema 2016-03-04 03:09:49 +08:00
Marco129
90a1e46905 Fix create system class with relation/pointer 2016-03-03 16:37:30 +08:00
Nikita Lutsenko
99cb05ea1e Use throws syntax for errors in SchemasRouter. 2016-03-02 23:48:12 -08:00
Nikita Lutsenko
2733c0924b Remove direct mongo access from Schema.spec.js. 2016-02-29 19:47:08 -08:00
Nikita Lutsenko
6893895aea Remove direct mongo access from SchemaRouter.modify, Schema.deleteField. 2016-02-29 19:47:08 -08:00
Nikita Lutsenko
7215300c1e Move Mongo database property directly to mongo adapter. 2016-02-29 12:50:47 -08:00
Fosco Marotto
791c5512aa Merge pull request #567 from IlyaDiallo/master
Accept subdocuments keys ("object.subobject"), to allow atomic updates of an object field.
2016-02-26 02:05:03 -08:00
Fosco Marotto
5755126525 Fixed ACL creation for #504. 2016-02-22 17:33:11 -08:00
Ilya Diallo
831c2ee3de Update the tests 2016-02-22 16:45:41 +01:00
Drew Gross
a455e1b23f Finish implementation of PUT /schemas/:className 2016-02-16 12:30:30 -08:00
Drew Gross
747f278f2a Enable deleting pointer fields, fix tests 2016-02-10 16:25:28 -08:00
Drew Gross
0a0d4f65ef Finish implementation of delete field from schema 2016-02-10 14:12:27 -08:00
Drew Gross
b0c4b8f6ce Drop _Join collection when deleting a relation field 2016-02-10 14:12:27 -08:00
Drew Gross
f07836e33f Add validation of deleteField function 2016-02-10 14:12:27 -08:00
Nikita Lutsenko
3271b45102 Update imports in all specs. 2016-02-08 20:20:08 -08:00
Drew Gross
e2e0a26e9a Updates tests to allow calls that race to create a schema to have
the race loser return before the race winner. This test failed in
mongo 2.6.11, and I don't know if thats because it's generally
flaky or if that version of mongo makes less guarantees.
2016-02-05 19:29:00 -08:00
Drew Gross
b741539e25 More tests 2016-02-05 19:28:49 -08:00
Drew Gross
e6feefd223 Add and test logic for adding fields to the DB 2016-02-05 19:28:41 -08:00
Drew Gross
d934f3a863 Add class creation logic with validation 2016-02-05 19:28:25 -08:00
Fosco Marotto
7f5d744ce2 Initial release, parse-server, 2.0.0 2016-01-28 10:58:12 -08:00