89 Commits

Author SHA1 Message Date
Marc-Roig
7135f60a73 fix: expect normal throw 2022-12-20 15:09:34 +01:00
Marc-Roig
589571319f change strictConnect to strict 2022-12-20 15:09:21 +01:00
Marc-Roig
2639f8418e add strict configuration 2022-12-12 18:16:37 +01:00
Marc-Roig
32bb3a0645 throw validation error when passing wrong relations 2022-12-12 15:48:45 +01:00
Marc-Roig
b01fc82f52 validate sort array 2022-12-09 16:13:03 +01:00
Marc-Roig
02a23a00ef rephrase connect relation error 2022-12-05 14:41:20 +01:00
Marc-Roig
1ccb35486b refactor tests to have more clear descriptions 2022-12-05 11:40:51 +01:00
Marc-Roig
2c854a0cc5 change connect array error string to be more clear 2022-12-05 10:55:19 +01:00
Marc-Roig
b0e37e832b sort connect array only when necessary 2022-12-05 10:54:26 +01:00
Marc-Roig
05e09eee46 test disordered relations with initial relations 2022-12-01 16:44:46 +01:00
Marc-Roig
36ad92b2d6 sort connect array 2022-12-01 14:13:24 +01:00
Marc-Roig
c73971f9fd allow connecting the same id multiple times 2022-11-25 16:19:04 +01:00
Marc-Roig
6d49a36f54 rename to relations-orderer 2022-11-23 11:13:26 +01:00
Marc-Roig
6f183c3cf3 remove maxOrder from jsdoc 2022-11-23 11:12:50 +01:00
Marc-Roig
67beb86c1d test before after when creating relations 2022-11-22 18:57:04 +01:00
Marc-Roig
37b1ab9b52 fix typo 2022-11-22 14:27:56 +01:00
Marc-Roig
e1810df0cb Merge branch 'feature/relations-reordering' into relations-reordering/database-logic-refactor 2022-11-22 13:25:31 +01:00
Marc-Roig
37d50e0b59 Merge branch 'main' into feature/relations-reordering 2022-11-22 13:25:16 +01:00
Alexandre BODIN
8faf635975
Merge branch 'main' into fix/relation-mysql-below-8 2022-11-21 17:12:53 +01:00
Marc-Roig
6a1100b4f9 fix tests 2022-11-21 15:00:47 +01:00
Alexandre Bodin
69a5133b60 Rename to more generic window functions 2022-11-21 15:00:31 +01:00
Alexandre Bodin
25507f8328 Simplify main PR 2022-11-21 14:30:55 +01:00
Marc-Roig
c3c8f40d5b remove adjacent relations sorting as it is not necessary 2022-11-20 10:50:31 +01:00
Marc-Roig
114d67a9f2 fix adjacentRelations query to look for joinColum name 2022-11-20 10:49:59 +01:00
Marc-Roig
5fad91721b add reordering in attachRelations 2022-11-20 10:49:24 +01:00
Pierre Noël
c11ce77597 remove console log 2022-11-19 02:22:59 +01:00
Pierre Noël
6a530cbbfc put add-schema in knex util file 2022-11-19 00:01:10 +01:00
Pierre Noël
0c76c5ae1a add error management 2022-11-18 23:57:46 +01:00
Marc-Roig
a6993feab4 Merge branch 'feature/relations-reordering' into relations-reordering/database-logic-refactor 2022-11-18 09:29:13 +01:00
Marc-Roig
c568197c45 Merge branch 'main' into feature/relations-reordering 2022-11-18 09:28:57 +01:00
Marc-Roig
980624f176 add sorting 2022-11-17 10:08:59 +01:00
Pierre Noël
9ff4f19660 fix schema support for postgres when using raw queries 2022-11-17 10:08:49 +01:00
Pierre Noël
952a05514f use knex arguments when dropping the temporary table 2022-11-16 18:36:07 +01:00
Pierre Noël
eba2da51af refactor the way database version is fetched 2022-11-16 18:32:32 +01:00
Pierre Noël
6103e4de1f
Merge branch 'main' into fix/relation-mysql-below-8 2022-11-16 15:26:47 +01:00
Marc-Roig
6df6c9487b remove sorting from orderer 2022-11-16 12:44:28 +01:00
Jamie Howard
04295573f1 chore(entity-manager): revert to not handle multiple pg schemas 2022-11-16 11:22:22 +00:00
Pierre Noël
5e5d1c92c2 use getDatabaseInformation instead of databaseInformation 2022-11-16 10:58:28 +01:00
Jamie Howard
4b1f8101e6 fix(entity-manager): use db.connection for .raw()
chore(database): revert getConnection()
2022-11-16 09:34:08 +00:00
Pierre Noël
306d5c4abc finally drop temp table 2022-11-15 18:57:13 +01:00
Pierre Noël
e2234ed9f1 use connection instead of getConnection 2022-11-15 18:42:18 +01:00
Pierre Noël
887ea1ae59 Avoid use of window functions for MySQL versions below 8 2022-11-15 16:43:04 +01:00
Jamie Howard
5553538c18 chore 2022-11-15 13:37:18 +00:00
Jamie Howard
0f7eb70fd2 fix(database): refactor getConnection to not use schemas 2022-11-15 13:28:35 +00:00
Jamie Howard
cad6a8da1c fix(entity-manager): knex withSchema.raw error 2022-11-14 16:39:57 +00:00
Marc-Roig
ea5325b46c compact max order and adjacent sql queries into one 2022-11-11 17:08:52 +01:00
Marc-Roig
e151df5da6 add get method 2022-11-10 17:15:58 +01:00
Marc-Roig
6e9424cf00 make relations sorter a pure function 2022-11-10 16:53:44 +01:00
Marc-Roig
70595ae790 access array last element without at 2022-10-26 17:30:22 +02:00
Marc-Roig
7a9f43a027 log relation reorderer error 2022-10-25 16:12:10 +02:00