Commit Graph

6 Commits

Author SHA1 Message Date
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 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 23a1b0c9cc fix: return enum type
Signed-off-by: Muhammad Aaqil <aaqilcs102@gmail.com>
2023-11-17 15:33:29 +05:00
Christiaan Westerbeek b67b57970f Return if column is generated or not (#198)
* Return if column is generated or not

Related to
https://github.com/strongloop/loopback-datasource-juggler/issues/899

* add pk for testgen table

* Fixe the double quotes around generated

as requested by @loay

* Fix commit linter

Block must not be padded by blank lines padded-blocks

* Code fixes to follow guide

* Should fix the tests failing

Test failing on the tableName (incorrect case)
2017-03-08 18:56:27 -05:00
Carl Fürstenberg 5383c4c0ff Follow mysql recommendations for handling booleans
Per http://dev.mysql.com/doc/refman/5.7/en/numeric-type-overview.html
`BOOL` and `BOOLEAN` is alias for `TINYINT(1)` thus we should make
sure discover can handle as such.

Introducing three flags:

* treatCHAR1AsString
  default false - treats CHAR(1) as a String instead of a Boolean
* treatBIT1AsBit
  default true - treats BIT(1) as a Boolean instead of a Binary
* treatTINYINT1AsTinyInt
  default true - treats TINYINT(1) as a Boolean instead of a Number

The default handling for CHAR(1) is legacy backward compability due to
custom to use a CHAR(1) to store 'Y', 'N', '0', '1', etc...
2017-01-11 19:44:50 -08:00
Ryan Graham 2533fe8404
test: use dump of original test DB as seed 2016-08-09 19:14:51 -07:00