0.1.30 • Published 5 years ago
vv-mssql-shared v0.1.30
Install & Use
npm i vv-mssql-sharedconst vvms = require('vv-mssql-shared')
let script_create_or_alter_table = vvms.depot_sch_table('dbo', 'table1', 'my table #1', [
{name: 'fld1', description: 'field #1 - primary key', type: 'int', identity: true, pk_position: 1},
{name: 'fld2', description: 'field #2', type: 'bit'},
{name: 'fld3', description: 'field #3', type: 'nvarchar', len_chars: 100},
{name: 'fld4', description: 'field #4', type: 'nvarchar', len_chars: 'max'},
{name: 'fld5', description: 'field #5', type: 'decimal', precision: 14, scale: 3}
], 'ignore')
console.log(script_create_or_alter_table)Typedefs
sqltype : 'bigint' | 'bit' | 'decimal' | 'int' | 'money' | 'numeric' | 'smallint' | 'smallmoney' | 'tinyint' | 'float' | 'real' | 'date' | 'datetime2' | 'datetime' | 'datetimeoffset' | 'smalldatetime' | 'time' | 'char' | 'text' | 'varchar' | 'sysname' | 'nchar' | 'ntext' | 'nvarchar' | 'binary' | 'image' | 'varbinary' | 'hierarchyid' | 'sql_variant' | 'xml' | 'uniqueidentifier' | 'timestamp' | 'geometry' | 'geography'
MS SQL datatype
Kind: global typedef
type_sql_object_name : s.type_sql_object_name
Kind: global typedef
type_column
MS SQL tables column
Kind: global typedef
Properties
| Name | Type |
|---|---|
| name | string |
| type | sqltype |
| len_chars | number | 'max' |
| precision | number |
| scale | number |
| nullable | boolean |
| identity_seed | number |
| identity_increment | number |
| pk_position | number |
| description | string |
| collate | string |
type_sql
MS SQL datatype params
Kind: global typedef
Properties
| Name | Type |
|---|---|
| precision | 'deny' | 'allow' | number |
| scale | 'deny' | 'allow' | number |
| len | 'deny' | 'allow' | 'deny_max' | number |
| jstype | 'number' | 'Date' | 'string' |
| xsdtype | 'xs:integer' | 'xs:decimal' | 'xs:boolean' | 'xs:date' | 'xs:dateTime' | 'xs:time' | 'xs:string' |
| bytes_on_char | number |
| type | sqltype |
0.1.30
5 years ago
0.1.29
5 years ago
0.1.28
5 years ago
0.1.27
5 years ago
0.1.26
5 years ago
0.1.22
5 years ago
0.1.23
5 years ago
0.1.24
5 years ago
0.1.25
5 years ago
0.1.21
5 years ago
0.1.14
5 years ago
0.1.20
5 years ago
0.1.17
5 years ago
0.1.18
5 years ago
0.1.19
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.4
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.0.17
5 years ago
0.0.18
5 years ago
0.0.16
6 years ago
0.0.14
6 years ago
0.0.15
6 years ago
0.0.12
6 years ago
0.0.13
6 years ago
0.0.10
6 years ago
0.0.11
6 years ago
0.0.9
6 years ago
0.0.8
6 years ago
0.0.3
6 years ago
0.0.4
6 years ago
0.0.7
6 years ago
0.0.2
6 years ago