Muhammad Aaqil
07c4340a8b
Merge 41f55f9272
into 71f4ad2920
2025-05-02 20:01:39 +00:00
Muhammad Aaqil
2386245e15
feat: query to fetch unique columns
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2025-02-03 10:05:36 +05:30
Muhammad Aaqil
aa62346c40
fix: enable migration for enum property
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2024-09-01 20:32:02 +05:00
Muhammad Aaqil
8812d51862
fix: change condition to treat tinyint as boolean
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2024-09-01 20:31:07 +05:00
Muhammad Aaqil
41f55f9272
test: cover when an empty array of models is returned
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2024-09-01 19:19:32 +05:00
Muhammad Aaqil
77b2c401f8
fix: discover properties with json type
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2024-05-22 21:21:22 -04:00
Muhammad Aaqil
de5eac7731
fix: reading error code
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2024-04-17 07:53:43 -04:00
Muhammad Aaqil
8b94368ed4
fix: add order by ordinal position for query columns
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2024-01-21 07:18:51 +05:00
Muhammad Aaqil
23a1b0c9cc
fix: return enum type
...
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2023-11-17 15:33:29 +05:00
Samarpan Bhattacharya
07173b6bde
feat: add mysql8 support, update to mysql2 client and drop nodejs v14 and mysql5.7 support
...
BREAKING CHANGE
drop mysql5.7 support
Signed-off-by: Samarpan Bhattacharya <this.is.samy@gmail.com>
2023-06-30 15:28:47 +05:30
Muhammad Aaqil
ab28f74fb4
fix: parse some options to boolean
...
Signed-off-by: Muhammad Aaqil <aaqilniz@yahoo.com>
2023-06-19 09:55:38 -04:00
Samarpan Bhattacharya
a3b354b7f4
feat: add support for multiple insert in one query
...
BREAKING CHANGE
drop nodejs v12 support and juggler v3 support
Signed-off-by: Samarpan Bhattacharya <this.is.samy@gmail.com>
2023-01-06 08:25:20 -08:00
Akshat Dubey
bb6010ad01
feat(operators): add match against operator
...
Signed-off-by: Akshat Dubey <akshat.dubey@sourcefuse.com>
2021-10-16 18:20:56 +05:30
yongzhi-chen
f82154145d
fix (core) accepts boolean type
...
Signed-off-by: Mario Estrada <marioestradarosa@yahoo.com>
2021-05-26 12:52:44 -06:00
Miroslav Bajtoš
848f1ca230
remove bluebird from devDependencies
...
We were using bluebird as a Promise implementation for Node.js versions
that did not provide a native Promise (i.e. Node.js 0.10 & 0.12). There
is no need for that anymore, since Node.js have been shipping native
Promise implementation for years by now.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2020-08-28 08:49:05 +02:00
Miroslav Bajtoš
7ce66b5b81
update eslint + config to latest
...
Also fix linting errors, most notably get rid of `var` keyword.
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2020-08-28 08:43:09 +02:00
Miroslav Bajtoš
40ce105e57
update mocha to 8.x
...
Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
2020-08-28 08:37:39 +02:00
Diana Lau
2bb2f8d51f
chore: update copyrights year
2020-02-08 17:23:33 -05:00
jannyHou
f44e8f5594
chore: move mocha flag to opts
2019-11-07 09:58:22 -05:00
jannyHou
1617fc289e
fix: tests for datatypes
2019-11-06 16:21:43 -05:00
jannyHou
2c4591c23f
update tests
2019-11-06 16:21:26 -05:00
jannyHou
01c94b6a60
feat: run shared tests
2019-07-09 11:35:59 -04:00
Antonio Trapani
bc220f5a64
fix: allow DataSource to reconnect properly
...
Fixes issue where calling disconnect() method
and then the connect() method causes the "Pool
is closed" error. See issue #367 .
2019-05-23 14:08:26 -04:00
Agnes Lin
a12558e8a4
chore: update copyrights years
2019-05-07 13:37:19 -04:00
HugoPoi
24fe635de5
Fix bug property declared index being recreate
2019-04-26 11:25:50 -04:00
HugoPoi
681bff4586
Add onDelete onUpdate foreign key config options
2019-04-26 11:25:49 -04:00
HugoPoi
5d8104af3f
Fix bug foreign key index being delete wrongly
2019-04-26 11:25:49 -04:00
Raymond Feng
c97fdf39b4
pin mysql image to 5.7
...
See https://github.com/mysqljs/mysql/issues/2002
2018-07-12 10:53:38 -07:00
Raymond Feng
be599b9347
use "owner" for discovered results
2018-07-12 10:53:20 -07:00
Eric Dowell
99597460f0
Use MySQL DEFAULT Clause/Constant ( #319 )
...
* Adding ability to use MySQL DEFAULT clause
Adding mysql.default option and documentation on special case for date.
Adding unit tests for Default Clause.
* Handle unsupported types, don't stringify numbers
* Adding note about unsupported column types.
* Update readme.
2017-08-08 20:40:40 -04:00
ssh24
b229bad2a5
Remove unnecessary line causing validation fail
2017-07-31 16:52:56 -04:00
biniam
ad44168d4a
isNewInstance undefined for after save hook
...
Since using REPLACE or INSERT...ON DUPLICATE KEY
statements both give us affected rows of 1 for a
new row or a row which got updated with the same
values, we make isNewInstance undefined on after
save hook for save, replaceOrCreate, and
updateOrCreate methods. Also, disable juggler
tests for that functionality.
2017-07-26 22:21:06 -04:00
biniam
7a7a34e77f
upgrade eslint deps
2017-07-25 15:41:11 -04:00
Tetsuo Seto
b0ac2509f1
Add DECIMAL to Number prop type
2017-06-26 21:21:50 -07:00
ssh24
2ded0f96eb
Honor user specified datatype on PKs
2017-06-16 12:25:17 -04:00
biniam
134eeb24e2
Handle null vals properly
...
When converting null values
to database column values,
return null if column is
nullable, otherwise try
to cast it to the property
type, and if not, return
'null'.
2017-06-14 12:44:25 -04:00
ssh24
145d061e94
Allow case sensitive regex operation
2017-06-13 10:18:27 -04:00
biniam
3dad2bf4df
switch long and lat for geopoint type
...
MySQL expects reverse order of latitude and longitude
from the way we use it in LoopBack, so switch the order
when saving and loading Point spatial type we use for
Point/GeoPoint.
2017-06-06 08:54:13 -04:00
Kevin Delisle
c236eb068d
discovery.test: fix discoverModels tests
2017-06-05 13:50:46 -04:00
Kevin Delisle
7d2f0751f6
Add http status code translations for errors
...
Errors will now have their status codes set based on the error
message returned by the MySQL driver.
2017-05-31 17:02:09 -04:00
ssh24
44083e43c1
Allow explicit data types
...
Override columnDataType function
Add test cases
Apply feedback
Use date type as explicit datatype
2017-05-31 14:42:53 -04:00
biniam
0187f0434b
Revert "switch long and lat for geopoint type"
...
This reverts commit dd5bfb3f82
.
2017-05-31 10:30:00 -04:00
biniam
dd5bfb3f82
switch long and lat for geopoint type
2017-05-30 09:29:36 -04:00
Sakib Hasan
2ba88203f3
Escape index names ( #280 )
...
* Escape index names
* Add test cases
2017-05-19 11:57:06 -04:00
Sakib Hasan
18ddc84929
Fix docker setup ( #279 )
...
* Add support for host and database
* Order the optional parameters correctly
2017-05-15 13:38:30 -04:00
Joost de Bruijn
c3a336c18d
Adding support for fractional seconds.
2017-05-05 19:15:41 -04:00
Sergey Nosenko
72abcb8e9f
fix compare of foreign keys for autoupdate ( #272 )
...
* fix compare of foreign keys for autoupdate
use mysql table name in case it is not equal model name
* fix column name lookup for fk definition
* fix ADD CONSTRAINT for multiple fk
if more the one foreign key added ADD CONSTRAINT
must be separated with comma but not with space as applySqlChanges do.
* fix duplicate foreign key creation on autoupdate
* fix entity name selection
* change join to toString as requested
* fix removing dropped keys
* fix linter issues
* add test case with columnName in foreign key
and isActual check after autoupdate
* uncommit accitenally commited test case
2017-05-05 19:13:23 -04:00
Kevin Delisle
31a7728dd0
Tests for datetime types
2017-05-02 17:46:21 -04:00
Sergey Nosenko
ea33f557ab
Properties with mysql custom "columnName" don't get autoupdated ( #273 )
...
* #250 fix column escaping for autoupdate
* Fix lint error
2017-04-27 17:31:20 -04:00
Sakib Hasan
345492e5b2
Revert PR #257 ( #266 )
2017-04-24 16:19:33 -04:00