Merge pull request #314 from strongloop/update-docs-datatype-flags

Add datatype flags to README
This commit is contained in:
Biniam Admikew 2017-07-26 10:41:44 -04:00 committed by GitHub
commit 461ecf083e
1 changed files with 10 additions and 1 deletions

View File

@ -180,7 +180,7 @@ See [LoopBack types](http://loopback.io/doc/en/lb3/LoopBack-types.html) for de
<td>String</td>
</tr>
<tr>
<td>CHAR(1)</td>
<td>BIT(1)<br>CHAR(1)<br>TINYINT(1)</td>
<td>Boolean</td>
</tr>
<tr>
@ -205,6 +205,15 @@ See [LoopBack types](http://loopback.io/doc/en/lb3/LoopBack-types.html) for de
</tbody>
</table>
*NOTE* as of v3.0.0 of MySQL Connector, the following flags were introduced:
* `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
## Using the datatype field/column option with MySQL
Use the `mysql` model property to specify additional MySQL-specific properties for a LoopBack model.