naushadh · GitHub

added 17 commits

November 20, 2017 09:00
- Added `getMany` and `repsertMany` for batched `get` and `repsert`.
- Updated `insertEntityMany` to replace slow looped usage with batched execution.
- Upstreamed `updatePersistValue`, `mkUpdateText`, and `commaSeparated` from `Database.Persist.MySQL`.
- De-duplicated `updatePersistValue` from various `Database.Persist.Sql.Orphan.*` modules.
- Updated SqlBackend to add ability to configure backend specific putMany.
- Added a default `putMany` so `PersistUnique` doesn't have to demand all backends to implement it.
- Updated all SqlBackends to implement `connPutManySql`.
- Added basic test to verify insertion works.
Uniqueness diffing should be done on the unique keys rather than on the whole record.
- Removed the need for functor instance in `get`.
- Removed the need for conditional import on `<>`.
- Removed redundant `Map` include for NOSQL runs.
- Removed publicly exposing `defaultPutMany` as we only require it for SqlBackend instance definition.
- Updated `putMany` implementations to account for duplicates within the record set. also added test to verify "last" value takes precendence.
- Extended `mkUpdateText'` to allow injection/override of reference column. `upsert` in postgres fails with ambiguos column reference error.
…for older preludes.

MaxGabriel

@naushadh

MaxGabriel

Resolved conflict with 'persistent/Database/Persist/Sql/Orphan/PersistStore.hs' by accepting mine. This is because `parseEntityValues` already exposes rich error messaging the incoming change was implemeting.
Conflicts:
- persistent-postgresql/Database/Persist/Postgresql.hs
-
 persistent/Database/Persist/Sql/Orphan/PersistStore.hs

@naushadh

@MaxGabriel

Closed

Closed

11 tasks

@naushadh

Read the original on github.com ↗