pg-type:动态地向数据库添加新类型并向_existing_枚举添加新值

时间:2021-06-07 08:48:22
【文件属性】:
文件名称:pg-type:动态地向数据库添加新类型并向_existing_枚举添加新值
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-07 08:48:22
JavaScript PG型 向数据库动态添加新类型并向现有枚举添加新值 安装 npm install -S pg-type 用法 require ( 'pg-type' ) ( ) . connString ( 'postgres://localhost/mydb' ) . types ( { some_enum_type : [ 'val_1' , 'val_2' , 'val_3' ] , some_other_type : { type : 'domain' , as : 'int check ( value < 100 )' } } ) . create ( function ( error , results ) { /* Types added/modified! */ } ) 然后你最终会修改你的应用程序类型: require ( 'pg-
【文件预览】:
pg-type-master
----Gruntfile.js(821B)
----lib()
--------type-creator.js(5KB)
--------queries.js(679B)
--------db.js(1KB)
----test()
--------test.js(4KB)
----README.md(1KB)
----.gitignore(14B)
----index.js(139B)
----package.json(859B)

网友评论