Commit Graph

52 Commits

Author SHA1 Message Date
Drew
5518edc2a5 Postgres adapter (#2012)
* Remove adaptiveCollection

* Remove an adaptiveCollection use

* Remove an adaptiveCollection

* make adaptiveCollection private

* Remove collection from mongoadapter

* Move schema collection usage into mongo adapter

* stop relying on mongo format for removing join tables

* reduce usage of schemaCollection

* remove uses of _collection

* Move CLP setting into mongo adapter

* remove all uses of schemaCollection

* make schemaCollection private

* remove transform from schemaCollection

* rename some stuff

* Tweak paramaters and stuff

* reorder some params

* reorder find() arguments

* finishsh touching up argument order

* Accept a database adapter as a parameter

* First passing test with postgres!

* Actually use the provided className

* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"

* Start dealing with test shittyness

* Make specific server config for tests async

* Fix email validation

* Fix broken cloud code

* Save callback to variable

* undo

* Fix tests

* Setup travis

* fix travis maybe

* try removing db user

* indentation?

* remove postgres version setting

* sudo maybe?

* use postgres username

* fix check for _PushStatus

* excludes

* remove db=mongo

* allow postgres to fail

* Fix allow failure

* postgres 9.4

* Remove mongo implementations and fix test

* Fix test leaving behind connections
2016-06-12 16:35:13 -07:00
Drew
7e868b2dcc Unique indexes (#1971)
* Add unique indexing

* Add unique indexing for username/email

* WIP

* Finish unique indexes

* Notes on how to upgrade to 2.3.0 safely

* index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"

* reconfigure username/email tests

* Start dealing with test shittyness

* Remove tests for files that we are removing

* most tests passing

* fix failing test

* Make specific server config for tests async

* Fix more tests

* fix more tests

* Fix another test

* fix more tests

* Fix email validation

* move some stuff around

* Destroy server to ensure all connections are gone

* Fix broken cloud code

* Save callback to variable

* no need to delete non existant cloud

* undo

* Fix all tests where connections are left open after server closes.

* Fix issues caused by missing gridstore adapter

* Update guide for 2.3.0 and fix final tests

* use strict

* don't use features that won't work in node 4

* Fix syntax error

* Fix typos

* Add duplicate finding command

* Update 2.3.0.md
2016-06-10 20:27:21 -07:00
Jeremy Pease
c6c9c97b54 Allow custom error codes with response.error from Cloud Code functions and before/after hooks (#1955) 2016-06-01 10:28:06 -04:00
Drew
cd525802a6 Remove mongoFind and mostly remove adaptiveCollection (#1924)
* Use adapter.count

* use adapter.upsertOneObject

* Use adapter.deleteObjectsByQuery

* Use adapter.find

* use adapter.find

* Update tests to avoid mongoFind

* Fix a test to not use mongoFind

* Fix a test to not use mongoFind

* remove some mongoFind

* Remove some mongoFind

* Remove some mongoFind

* Remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* remove more mongoFind

* Restore update ios device token with duplicate device token to original

* remove a mongoFind

* remove a mongoFind

* formatting

* formatting

* remove a mongoFind

* remove a mongoFind

* remove a mongoFind

* kill mongoFind

* Fix tests

* Fix tests

* fix syntax

* Fix test
2016-05-28 12:25:09 -04:00
Madhav Bhagat
181b12771d Make beforeSave work when object is passed to success (#1937) 2016-05-28 12:21:22 -04:00
Drew Gross
74ee8613d8 Fix inner keys named _rperm, _wperm 2016-05-23 18:39:19 -07:00
Drew Gross
c928dcc118 Prevent untransforming inner object keys named _p_* 2016-05-23 18:38:48 -07:00
Drew Gross
9f149e6db5 Don't mess with inner object keys called _auth_data_* 2016-05-23 18:38:16 -07:00
Drew
614e1ac8e5 Move query logic into mongo (#1885)
* Move Parse Server logic into Parse Server and out of MongoAdapter

* Move untransforming up one level

* Make find() in MongoStorageAdapter

* Put nested object untransforming into it's own function

* Simplfy nested untransform

* Don't mess with inner object keys called _auth_data_*

* Prevent untransforming inner object keys named _p_*

* Fix inner keys named _rperm, _wperm

* Fix bugs with inner objects behaving strange when other fields have same name as key in specific circumstances

* remove params from untransform nested object

* Revert changes to find
2016-05-23 19:31:51 -04:00
Drew
b2183680be Refactor cloud code tests (#1837)
* Move cloud code tests

* Remove _removeHook calls that are no longer necessary

* Use Strict
2016-05-19 13:38:16 -07:00
Drew
4d4361451c Refactor MongoTransform.js (#1823)
* Split transformAtom into transfromTopLevelAtom and transformInteriorAtom

* Use single param for inArray and inObject

* Tidyness in transformKeyValue

* Add transformInteriorKeyValue

* Remove update from tranformInteriorKeyValue

* Split out transform update

* Move validation out of transfromUpdate

* Remove force paramater from transformTopLevelAtom throw error after if necessary

* Turn transformKeyValue into transfromKey since it is only used for that purpose

* Remove unnecessary stuff from transformKey

* convert transformKey to use parse format schema

* interior keys fixes

* Add test for interior keys with special names

* Correct validation of inner keys
2016-05-18 18:14:54 -07:00
Tyler Brock
1854928fe7 Add test to ensure you can set ACL in beforeSave (#1772) 2016-05-13 18:17:22 -07:00
Marco Cheung
19e7407f55 Return correct error when violating unique index (#1763) 2016-05-11 17:24:15 -07:00
Drew
e698f61a58 Handle null param in cloud code. Fixes #1472 (#1746) 2016-05-10 10:43:02 -07:00
Drew
957b5927b1 Ignore _RevoableSession "header" that is sent by JS SDK. Fixes #1548. (#1627) 2016-04-25 15:52:21 -04: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
Florent Vilmart
d49d539a81 _PushStatus uses proper Parse format (#1580)
* removes mongo style props from _PushStatus

* removes log

* Update MongoTransform.js

Removes _id case
2016-04-21 21:36:15 -04:00
Florent Vilmart
2d94a885d2 regression test for #1554 2016-04-20 21:51:48 -04:00
Florent Vilmart
a770c4cba8 Adds relation fields to objects 2016-04-08 07:42:02 -04:00
Florent Vilmart
91de7504fe 🎉 fixes #1288
*  regression test for #1288

* 🎉 fixes #1288
2016-04-04 14:27:11 -04:00
Florent Vilmart
e270964b4b adds test for issue #1031 2016-03-17 00:04:52 -04:00
Florent Vilmart
e1c475512c Returns updated keys when running with beforeSave 2016-03-16 23:48:52 -04:00
Florent Vilmart
ba545fbf59 Returns full modifications on PUT 2016-03-16 22:30:52 -04:00
wangmengyan95
8ea2b615a4 Do master query for before/afterSaveHook 2016-03-10 22:38:07 -08:00
Nikita Lutsenko
0f07c5204e Add test validating that we have ACL propagate to before/after save hooks. 2016-03-08 16:15:49 -08:00
Fosco Marotto
e92ee7e1c2 Merge pull request #863 from ParsePlatform/fosco.authData2
Test empty authData block on login for #413
2016-03-06 14:35:23 -08:00
Fosco Marotto
3266d59fcc beforeSave changes should propagate to the response 2016-03-06 02:16:17 -08:00
Fosco Marotto
2d4c08c5a3 Test empty authData block on login for #413 2016-03-06 01:03:51 -08:00
Nikita Lutsenko
edc7720660 Add tests that verify installationId in Cloud Code triggers. 2016-03-02 21:02:50 -08:00
Nikita Lutsenko
b778b314fb Flatten custom operations in request.object in afterSave hooks. 2016-03-02 18:25:27 -08:00
Fosco Marotto
bfafcd4e87 Fix an installation deduplication bug 2016-03-02 14:14:12 -08:00
Florent Vilmart
e43c471a7e Adds test that ensures the keys are properly set when using cloudcode 2016-02-28 12:38:36 -05:00
Nikita Lutsenko
0cf3f56b00 Remove dependency from DatabaseAdapter on cache.js. 2016-02-26 20:46:49 -08:00
Florent Vilmart
9ac7a52e40 Adds Hooks API
Adds Parse.Hooks.js in src/cloud-code/Parse.Hooks.js
Moves Cloud code related functions in src/cloud-code
2016-02-25 08:10:07 -05:00
Nikita Lutsenko
39dce71e4f Add a test to validate pointer mutation in beforeSave hooks. 2016-02-24 01:24:16 -08:00
Nikita Lutsenko
24a25d14b3 Unify all beforeSave with custom hooks into a single describe(), reset the global state on before/after test. 2016-02-23 22:01:12 -08:00
Nikita Lutsenko
69efeac1a3 Enable strict mode in ParseAPI.spec.js. 2016-02-23 22:00:48 -08:00
Nikita Lutsenko
14cc82a057 Fix dirtyKeys() and dirty(key:) on beforeSave when updating objects. 2016-02-23 21:50:17 -08:00
Nikita Lutsenko
be693fb736 Do not pass objectId, updatedAt, createdAt to beforeSave hooks on object create. 2016-02-22 19:33:32 -08:00
Björn Kaiser
ce1de0a5ef Cloud Function validation now uses the complete request instead of just the request parameters 2016-02-17 20:43:09 +00:00
Björn Kaiser
bd0d21af29 Merge remote-tracking branch 'upstream/master' 2016-02-17 20:35:17 +00:00
Fosco Marotto
eace10f35e Merge pull request #439 from flovilmart/flovilmart.cloud-code-request-params
Adds ability to pass qs params to cloud code functions
2016-02-16 05:13:32 -08:00
Florent Vilmart
8296d77f28 Adds ability to pass qs params to cloud code functions 2016-02-15 22:18:19 -05:00
Lewuathe
ce4f13f3bf Limit 100 records as default 2016-02-13 17:58:46 +09:00
Björn Kaiser
ec1bbc8d74 Merge remote-tracking branch 'upstream/master' 2016-02-12 20:37:10 +00:00
Nikita Lutsenko
3271b45102 Update imports in all specs. 2016-02-08 20:20:08 -08:00
Björn Kaiser
4822d2b668 Merge branch 'master' into test_for_calling_nonexisting_cf 2016-02-03 22:08:30 +00:00
Björn Kaiser
5b960d3d50 Merge remote-tracking branch 'upstream/master' 2016-02-03 21:27:54 +00:00
Björn Kaiser
035fcd2615 Added test for proper handling of trying to call a non-existing Cloud Function 2016-02-03 21:21:30 +00:00
Björn Kaiser
b8752c8687 Merge branch 'master' of github.com:codegefluester/parse-server 2016-02-03 20:53:58 +00:00