Commit Graph

75 Commits

Author SHA1 Message Date
Samarpan Bhattacharya 28dec15d0a fix: rebiew comments
Signed-off-by: Samarpan Bhattacharya <this.is.samy@gmail.com>
2022-09-22 10:42:26 -04:00
Samarpan Bhattacharya 7a02f12194 feat: add capability for insert multiple rows in single query
Signed-off-by: Samarpan Bhattacharya <this.is.samy@gmail.com>
2022-09-22 10:42:26 -04:00
Rifa Achrinza d17b2414f5 fix: support additional values for Connector.isNullable
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
2022-08-25 22:36:49 +00:00
Raymond Feng 8d8361337d Group clauses for AND/OR conditions
This is required to preserve the order of conditions


Signed-off-by: Raymond Feng <enjoyjava@gmail.com>
2020-11-06 09:47:25 -08:00
ewrayjohnson acfb5e2fce
Improve assertion in ParameterizedSQL builder
Fixed the problem where the application hangs when a param is a very
large Buffer.

Avoid expensive string building if assertion passed.

Co-authored-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2020-07-31 16:15:54 +02:00
Agnes Lin 9d03b8cde8 push column/idcolumn to connector level and renam 2020-04-17 14:28:19 -04:00
Michael DePetrillo 25ce706166 fix: run migrations in series 2020-03-30 14:29:29 -04:00
Agnes Lin aa26562cbe fix the way it gets column name for id property 2020-02-28 13:10:07 -05:00
Diana Lau 32aef14f10 chore: update copyright year 2020-02-10 13:52:06 -05:00
Janny b294519787
feat: add isactive check for transaction (#164) 2020-01-20 15:33:38 -05:00
Miroslav Bajtoš a1fe28a3a4
Fix eslint violations
Run `eslint --fix .` to add trailing commas to function arguments.

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-11-01 13:45:20 +01:00
Marvin Irwin ab99062e63
Fix SqlConnector to ignore empty WHERE statements 2019-09-20 17:02:30 +02:00
Dominique Emond 7ab10fb8fb fix: prevent adding listeners past limit
Co-authored-by: Dominique Emond <dremond@ca.ibm.com>
2019-08-13 19:09:48 -04:00
Nora 4c4d05fe87 chore: update deps and fix lint violations 2019-08-02 09:50:51 -04:00
Biniam Admikew d79092aadb chore: add promise support
Add promise support to transaction methods.

Co-Authored-By: Miroslav Bajtoš <mbajtoss@gmail.com>
2019-06-28 09:26:58 -04:00
Samarpan Bhattacharya 998cfba9ae feat: map property name to table column name 2019-05-02 18:53:00 +05:30
Diana Lau 59d7089f7d chore: update copyrights years 2019-04-18 17:42:33 -04:00
biniam 95b907b157 fix: make prop def getter backward-compatible
Return early for non-nested properties as before,
and undefined instead of erroring out when the
property type is undefined.
2019-02-22 22:46:38 -05:00
Piero Maltese 30c32b58d3 feat: retrieve nested property definitions 2019-02-15 14:20:01 -05:00
Raymond Feng 5ab9c9c76e allow schema or owner 2018-07-16 14:40:20 -07:00
Miroslav Bajtoš a695cb22e1
Update eslint + config to latest 2018-06-12 16:33:52 +02:00
Jürg Lehni b6670f5d6c Transaction: Support moving timeout to connector 2017-08-31 16:43:51 +02:00
Jürg Lehni e253d39901 Add support for transactions in count() 2017-08-23 16:35:19 +02:00
Diana Lau 5a00628526 Fix transaction 2017-07-14 11:24:08 -04:00
Quentin Presley 2bcd916a86 Fix comment lines 2017-06-27 22:38:17 -04:00
Rand McKinney d1d24529cc Fix API docs (#80)
* Fix API docs

* Replace some text removed from doc comments

* Fix connector docs

* Fix parameterized sql docs

* Fix sql docs
2017-06-22 13:06:24 -04:00
Loay Gewily d2d426c93b Fix update bug when id not found 2017-04-14 01:51:31 -04:00
Tetsuo Seto 6d5745f8b6 Add generateUniqueId prototype 2017-04-06 11:47:52 -07:00
Sakib Hasan 40f3844b5b Extract getAddModifyColumns into base (#90)
* Extract getAddModifyColmns into base

* Extract globalized strings
2017-03-20 11:15:27 -04:00
Raymond Feng e77b300384 Update deps and fix styles 2017-03-06 15:40:47 -08:00
Janny 050cfa5249 Add checkFieldAndIndex (#87)
* Add checkFieldAndIndex
2017-03-03 20:22:08 -05:00
ssh24 12a279d248 Refactor SQL migration methods
Extract getTableStatus into a own function itself
Have showFields, showIndexes and alterTable as a base function

Add isActual as a base function

Also include getAddModifyColumns and getDropColumns for the sake of CI

Add getDropColumns as a base function

Add searchForPropertyInActual to base connector

Add addPropertyToActual to base connector

Add propertyHasNotBeenDeleted to base

Add applySqlChanges to base connector

Add columnDataType as base function
2017-03-02 11:32:09 -05:00
Loay Gewily 5dc110afbf Fix replaceById for Oracle 2017-02-28 17:02:23 -05:00
Loay 1b4409a39a Refactor SQL discovery methods 2017-02-28 11:21:37 -05:00
Loay Gewily c232653c5d Fix replaceById unfound id bug 2017-01-26 00:22:43 -05:00
Masu Lin d45aaec5ef Add JSONStringPacker
Add a helper for encoding JavaScript values into JSON String format.

The implementation is based on JSON String format
and preserves JavaScript objects like Buffers
and Dates, as opposed to encoding format.
2016-10-29 00:20:34 +08:00
Miroslav Bajtoš 6fd3ac7285 Add BinaryPacker from kv-redis connector
Add a helper for encoding JavaScript values into binary Buffers.

The implemenetation is based on msgpack5 format and preserves JavaScript
objects like Buffers and Dates, as opposed to (binary)JSON.
2016-10-24 09:58:04 +02:00
Miroslav Bajtoš 2cbc1143c1 Add ModelKeyComposer from kv-redis connector
Add two helper methods for composing and parsing key-value keys:
 - in juggler, we use (modelName, key) tuple
 - in backends, there is usually a single string key required
2016-10-24 09:58:04 +02:00
Candy d8f303178c Add globalization 2016-07-27 13:19:19 -04:00
Ryan Graham 958c6619e3
update copyright notices and license 2016-05-05 21:50:59 -07:00
Amir Jafarian 70277da109 Fix linting errors 2016-04-11 13:06:33 -04:00
Amir Jafarian fc33ced470 Auto-update by eslint --fix 2016-04-09 14:35:52 -04:00
Amir-61 505d219129 Merge pull request #35 from strongloop/replace
Implement replace
2016-03-28 17:06:11 -04:00
Maor Hayun eba7e68059 fixed build of where statement when filter contains non-existing column 2016-02-06 19:07:49 +02:00
Amir Jafarian 9c7fef5789 change replace to replaceById 2016-01-27 09:46:35 -05:00
Amir Jafarian b16f9e0169 Remove underscore from _buildReplaceFields
*Remove underscore from _buildReplaceFields because it is a protected method subject to override by subclasses.
2016-01-14 12:46:14 -05:00
Amir Jafarian 48931922c3 Change _buildReplace to buildReplace 2016-01-12 17:27:55 -05:00
Amir Jafarian 98795213fc Change _buildUpdate to buildUpdate 2016-01-12 13:22:37 -05:00
Amir Jafarian 97c972e3ea Apply feedback 2016-01-09 03:23:49 -05:00
Amir Jafarian 1e5c7dbfc4 call execute directly for _replace 2016-01-07 22:03:10 -05:00