mango-orm 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/mango.d.ts +1 -0
- package/dist/src/mango.js +8 -0
- package/package.json +1 -1
package/dist/src/mango.d.ts
CHANGED
|
@@ -271,6 +271,7 @@ declare class Mango {
|
|
|
271
271
|
getTables(): MangoTable<any>[];
|
|
272
272
|
createTable<T>(name: string, fields: Record<string, MangoType>): Promise<MangoTable<T>>;
|
|
273
273
|
dropTable(name: string): Promise<void>;
|
|
274
|
+
haveTable(name: string): boolean;
|
|
274
275
|
customQuery<Type>(query: string, supplies: any[]): Promise<Type>;
|
|
275
276
|
}
|
|
276
277
|
export { Mango, MangoType, MangoTable };
|
package/dist/src/mango.js
CHANGED
|
@@ -707,6 +707,14 @@ class Mango {
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
|
+
haveTable(name) {
|
|
711
|
+
for (const table of this.tables) {
|
|
712
|
+
if (table.getName() === name.toLowerCase()) {
|
|
713
|
+
return true;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return false;
|
|
717
|
+
}
|
|
710
718
|
customQuery(query, supplies) {
|
|
711
719
|
return this.query.customQuery(query, supplies);
|
|
712
720
|
}
|