Commit Graph

19 Commits

Author SHA1 Message Date
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
Loay 9c9b61e7dc Update eslint infrastructure 2016-08-10 20:04:26 -04:00
Ryan Graham 2533fe8404
test: use dump of original test DB as seed 2016-08-09 19:14:51 -07:00
Ryan Graham 45491d1d90
test: match case with example/table.sql 2016-08-09 11:25:38 -07:00
Ryan Graham 5a7cac6852
test: separate assertions from test flow control 2016-08-09 11:25:38 -07:00
Ryan Graham 9ad29ddbaa
test: update tests to use example DB
Use should.match() so we can use case-insensitve regexp for properties
that change case depending on the server being tested against.
2016-08-09 11:25:38 -07:00
Ryan Graham 340a4eb0f6
insert/update copyright notices 2016-05-03 16:52:03 -07:00
Raymond Feng be54c1a407 Refactor the code to use base SqlConnector 2015-05-13 10:17:15 -07:00
Raymond Feng f9caaafe37 Better handle discovery of nullable columns 2014-12-03 14:09:52 -08:00
Raymond Feng b0f636a4c4 Fix the query for discovery with current user
See https://github.com/strongloop/loopback-connector-mysql/issues/22
2014-04-08 08:35:39 -07:00
Raymond Feng e54aa56cee Reformat code 2014-02-12 16:57:06 -08:00
Raymond Feng e16e67568c Add the test for loopback-datasource-juggler PR-48
https://github.com/strongloop/loopback-datasource-juggler/pull/48
2013-12-05 16:09:15 -08:00
Raymond Feng 2a0970317a Rename ADL to LDL 2013-10-14 15:19:36 -07:00
Raymond Feng 9276025bc6 Refine the usage of rc 2013-08-23 14:31:43 -07:00
Raymond Feng 2b20ccdbd7 Use .loopback rc to load the config 2013-08-21 21:53:48 -07:00
Raymond Feng a06f4e5289 Disable console output for tests 2013-08-20 10:23:51 -07:00
Raymond Feng 9daf9ef91c Rename 'loopback-data' to 'loopback-datasource-juggler' 2013-07-30 14:21:10 -07:00
Raymond Feng 4bedf2200c Add discovery test cases 2013-07-21 22:57:19 -07:00