expo-sqlite-wrapper
Advanced tools
Comparing version 1.0.9 to 1.1.0
{ | ||
"name": "expo-sqlite-wrapper", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "This is a wrapper for `expo-sqlite` as it make it very easy to create, update and work with the database file", | ||
@@ -5,0 +5,0 @@ "main": "index.tsx", |
@@ -31,9 +31,9 @@ # expo-sqlite-wrapper | ||
static GetTableStructor() { | ||
return new TableStructor( | ||
return new TableStructor<Parent, TableNames>( | ||
"Parents", | ||
[ | ||
{ columnName: "id", columnType: ColumnType.Number, nullable: false, isPrimary: true, autoIncrement: true }, | ||
{ columnName: "name", columnType: ColumnType.String }, | ||
{ columnName: x=> x.id, columnType: ColumnType.Number, nullable: false, isPrimary: true, autoIncrement: true }, | ||
{ columnName: x=> x.name, columnType: ColumnType.String }, | ||
//isUique acts as an Id too as the library will chack if there exist an item with the same field value and will update instead. | ||
{ columnName: "email", columnType: ColumnType.String, isUique: true } | ||
{ columnName: x=> x.email, columnType: ColumnType.String, isUique: true } | ||
] | ||
@@ -55,11 +55,11 @@ ) | ||
static GetTableStructor() { | ||
return new TableStructor( | ||
return new TableStructor<Child, TableNames>( | ||
"Childrens", | ||
[ | ||
{ columnName: "id", columnType: ColumnType.Number, nullable: false, isPrimary: true, autoIncrement: true }, | ||
{ columnName: "name", columnType: ColumnType.String }, | ||
{ columnName: "parentId", columnType: ColumnType.Number, nullable: true }, | ||
{ columnName: x=> x.id, columnType: ColumnType.Number, nullable: false, isPrimary: true, autoIncrement: true }, | ||
{ columnName: x=> .name, columnType: ColumnType.String }, | ||
{ columnName: x=> x.parentId, columnType: ColumnType.Number, nullable: true }, | ||
], | ||
[ | ||
{ contraintTableName: "Parents", contraintColumnName: "id", columnName: "parentId" } | ||
{ contraintTableName: "Parents", contraintColumnName: "id", columnName: x=> x.parentId } | ||
] | ||
@@ -66,0 +66,0 @@ ) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50669
900