Commit Graph

1243 Commits

Author SHA1 Message Date
Drew
006540cda5 Implement pointer types in postgres. (#2086)
* Support pointers in postgres

* implement count

* Fix bug in createClass
2016-06-17 11:09:42 -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
Vitaly Tomilov
7da4debbe0 Update PostgresStorageAdapter.js (#2087)
1. Deleting tables in a transaction, as opposed to just a task.
2. Added transaction where it was supposed to be. However, it is not enough, the logic is still broken there...

First, do not use `.catch` before `.then`. It is dangerous without good understanding how it actually works.

Check this out:
```js
        .catch(error => {
          if (error.code === PostgresRelationDoesNotExistError) {
            return this.createClass(className, {fields: {[fieldName]: type}}) // this gets into the following `.then`
          } else if (error.code === PostgresDuplicateColumnError) {
            // Column already exists, created by other request. Carry on to
            // See if it's the right type.
           
// this will get the following `.then` with `undefined` as the value

          } else {
            throw error;
          }
        })
```
2016-06-17 00:04:58 -07:00
Drew
c37a4ea1a1 Incorporate vitaly-t changes (#2085) 2016-06-16 19:34:00 -07:00
Drew
9d078003a6 Pin pg-postgres version (#2084) 2016-06-16 18:44:31 -07:00
Vitaly Tomilov
a685ed8814 Update package.json (#2083)
upgrading pg-promise version.
2016-06-16 18:43:08 -07: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
1a75101146 Fix flaky test (#2078)
* Debug flaky test

* create new object instead of modifying and assigning existing object

* use getOneSchema instead of this.data when updating fields

* Remove debug stuff

* Don't try to validate existing fields

* run just one test

* Verbose test all

* Use schema instead of this.data

* Switch to all tests
2016-06-16 15:34:33 -07:00
Greenkeeper
627b4164bb chore(package): update express to version 4.14.0 (#2079)
https://greenkeeper.io/
2016-06-16 10:39:13 -07:00
Fosco Marotto
d1f77a9a98 Merge pull request #2053 from drew-gross/postgres-3
Continue with postgres support
2016-06-16 10:19:07 -07:00
Greenkeeper
35ed09a7b4 chore(package): update redis to version 2.6.2 (#2076)
https://greenkeeper.io/
2016-06-16 08:53:30 -07:00
Blayne Chard
2eb861db66 Fixing typo in _loadRoles which prevents caching of roles. (#2063) 2016-06-15 22:22:23 -07:00
Drew
ae0ba7b5a9 Pin packages (#2073)
* Pin all package versions

Closes #2040

* Pin packages to a working version

* Drop extra stuff
2016-06-15 23:28:07 -04:00
Drew
726c866a4d Remove console.log 2016-06-15 17:25:17 -07:00
Drew
f7f5bab75d Remove attempt to fix tests 2016-06-15 17:24:00 -07:00
Drew
9ed3fcc536 Remove duplicate test 2016-06-15 17:23:29 -07:00
Drew Gross
8130658583 Fix purge 2016-06-15 15:01:21 -07:00
Drew Gross
f23d80ec9a Ignore coverage requirements for postgres adapter until I can figure out how to run coverage on it. 2016-06-15 13:11:51 -07:00
Drew Gross
510a890a03 centralize mongo schema handling logic 2016-06-15 13:11:51 -07:00
Drew Gross
a69a88f3a4 Fix some stuff 2016-06-15 13:11:51 -07:00
Drew Gross
f796d69d19 Move $options validation into Parse Server 2016-06-15 13:11:51 -07:00
Drew Gross
452b737be4 WIP 2016-06-15 13:11:51 -07:00
Drew Gross
634d672ad1 passing another test 2016-06-15 13:11:51 -07:00
Drew Gross
803b9be97a Add unique indexing for username/email
WIP

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

most tests passing

Make specific server config for tests async

Fix more tests

Save callback to variable

undo

remove uses of _collection

reorder some params

reorder find() arguments

finishsh touching up argument order

Accept a database adapter as a parameter

First passing test with postgres!

Fix tests

Setup travis

sudo maybe?

use postgres username

reorder find() arguments

Build objects with default fields correctly

Don't tell adapter about ACL

WIP

Passing postgres test with user

Fix up createdAt, updatedAt, nad _hashed_password handling
2016-06-15 13:11:51 -07:00
Drew Gross
2cafd6919f Passing postgres test with user 2016-06-15 13:11:51 -07:00
Drew Gross
f75c8b3a4d index on unique-indexes: c454180 Revert "Log objects rather than JSON stringified objects (#1922)"
reconfigure username/email tests

Fix broken cloud code

Save callback to variable

undo

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

Fix issues caused by missing gridstore adapter

remove uses of _collection

reorder find() arguments

Accept a database adapter as a parameter

sudo maybe?

use postgres username

reorder find() arguments

Build objects with default fields correctly

Don't tell adapter about ACL

WIP
2016-06-15 13:11:51 -07:00
Lemuel Barango
693707b33c fixed typo in comment (#2070) 2016-06-15 13:09:20 -07:00
Florent Vilmart
39f11a5134 Update .travis.yml (#2065)
Runs coverage no matter what build result.
2016-06-14 20:10:48 -07:00
Marco Cheung
b2a5092627 Endpoint for purging all objects in class (#2032)
* Endpoint for purging all objects in class

* Use deleteObjectsByQuery

* Standalone handling function and purge cache

* Change endpoint url
2016-06-14 15:52:49 -07:00
Marco Cheung
d9f8486790 Fix role test (#2057) 2016-06-14 10:17:15 -07:00
Héctor Ramos
5838a49396 Move logging docs to Advanced configuration (#1895) 2016-06-13 13:05:33 -07:00
Greenkeeper
63e2ceeb02 chore(package): update deepcopy to version 0.6.3 (#2049)
https://greenkeeper.io/
2016-06-13 09:36:50 -07:00
Marco Cheung
7c8ad7e071 Throw error when push is missing configuration (#2035) 2016-06-13 09:26:02 -07:00
Marco Cheung
0ec78d478b Fix checking existent class for allowClientClassCreation (#2051) 2016-06-13 09:21:52 -07:00
Drew
2cc1b0cfa9 Remove unused function (#2046) 2016-06-13 07:34:57 -04:00
Vitaly Tomilov
324cd85775 Update PostgresStorageAdapter.js (#2045)
1. removing `return` where it does nothing;
2. changing repeated queries to be executed as a task. See [Chaining Queries](https://github.com/vitaly-t/pg-promise/wiki/chaining-queries).
2016-06-12 17:27:02 -07:00
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
d559cb2382 Move transform acl (#2021)
* Move ACL transforming into Parse Server

For the database adapters, it will be more performant and easier to work with _rperm and _wperm than with the ACL object. This way we can type it as an array and so on, and once we have stronger validations in Parse Server, we can type it as an array containing strings of length < x, which will be much much better in sql databases.

* Use destructuring
2016-06-12 13:39:41 -07:00
Drew
5baa53d858 Changelog 2.2.13 (#2039) 2016-06-12 13:06:08 -07:00
Drew
729a0c101d Pin deepcopy (#2038) 2016-06-12 15:59:23 -04:00
Yaroslav Syrytsia
afbc662dcd fix gettings user roles from cache (#2034) 2016-06-12 02:43:11 -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
Michael Chan
6415a35433 Update google.js (#2023)
Updated the authentication method of Google Sign-in (from v1 to v3)
2016-06-10 16:25:25 -07:00
Dan Huang
11301d9590 Fix an issue in MongoTransform where transforming object type fields with null values fails (#2029) 2016-06-10 13:44:41 -07:00
Drew
a00d795404 Changelog 2.2.12 (#2019)
* Changelog 2.2.12

* Update CHANGELOG.md
2016-06-09 18:41:02 -07:00
Marco Cheung
2e50416cba Recursive parse date in cloud function (#2014)
* Recursive parse date in cloud function

* Use _.mapValues
2016-06-09 12:37:05 -07:00
Drew
fcd914bdfd Revert "Log objects rather than JSON stringified objects" (#1995) 2016-06-08 10:11:08 -07:00
Patrick Pelletier
db76aa376f Merge pull request #2001 from skinp/legacy-files
Support file objects in the legacy bucket: files.parse.com
2016-06-07 18:36:24 -07:00
Patrick Pelletier
65518cdd64 Support file objects in the legacy bucket: files.parse.com 2016-06-07 15:59:45 -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