@snowtop/ent 0.1.0-alpha108 → 0.1.0-alpha110
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/package.json +1 -1
- package/parse_schema/parse.js +5 -1
- package/schema/index.d.ts +1 -1
- package/schema/schema.d.ts +1 -0
- package/schema/schema.js +3 -0
- package/testutils/db/temp_db.js +3 -1
package/package.json
CHANGED
package/parse_schema/parse.js
CHANGED
|
@@ -199,9 +199,13 @@ function processAction(action) {
|
|
|
199
199
|
if (f.nullable === "contentsAndList") {
|
|
200
200
|
f2.nullable = NullableResult.CONTENTS_AND_LIST;
|
|
201
201
|
}
|
|
202
|
-
else {
|
|
202
|
+
else if (f.nullable === "contents") {
|
|
203
203
|
f2.nullable = NullableResult.CONTENTS;
|
|
204
204
|
}
|
|
205
|
+
else if (f.nullable === "true") {
|
|
206
|
+
// shouldn't happen but ran into weirdness where it did...
|
|
207
|
+
f2.nullable = NullableResult.ITEM;
|
|
208
|
+
}
|
|
205
209
|
}
|
|
206
210
|
return f2;
|
|
207
211
|
});
|
package/schema/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Schema from "./schema";
|
|
2
2
|
export { Schema };
|
|
3
|
-
export { Field, AssocEdge, AssocEdgeGroup, InverseAssocEdge, Edge, Pattern, DBType, Type, FieldOptions, SchemaConstructor, SchemaInputType, getFields, getFieldsWithPrivacy, getStorageKey, ActionOperation, Action, EdgeAction, NoFields, FieldMap, Constraint, Index, ConstraintType, ForeignKeyInfo, requiredField, optionalField, UpdateOperation, TransformedUpdateOperation, SQLStatementOperation, EdgeUpdateOperation, TransformedEdgeUpdateOperation, getTransformedReadClause, getObjectLoaderProperties, GlobalSchema, } from "./schema";
|
|
3
|
+
export { Field, AssocEdge, AssocEdgeGroup, InverseAssocEdge, Edge, Pattern, DBType, Type, FieldOptions, SchemaConstructor, SchemaInputType, getFields, getFieldsWithPrivacy, getStorageKey, ActionOperation, Action, EdgeAction, NoFields, FieldMap, Constraint, Index, ConstraintType, ForeignKeyInfo, requiredField, optionalField, UpdateOperation, TransformedUpdateOperation, SQLStatementOperation, EdgeUpdateOperation, TransformedEdgeUpdateOperation, getTransformedReadClause, getObjectLoaderProperties, GlobalSchema, ActionField, } from "./schema";
|
|
4
4
|
export { Timestamps, Node, BaseEntSchema, BaseEntSchemaWithTZ, EntSchema, EntSchemaWithTZ, SchemaConfig, } from "./base_schema";
|
|
5
5
|
export * from "./field";
|
|
6
6
|
export * from "./json_field";
|
package/schema/schema.d.ts
CHANGED
package/schema/schema.js
CHANGED
|
@@ -160,6 +160,9 @@ function getTransformedReadClause(value) {
|
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
exports.getTransformedReadClause = getTransformedReadClause;
|
|
163
|
+
// would like to avoid calling this so that itwe don't run into circular dependencies
|
|
164
|
+
// but the fact that it returns a clause makes it hard since we don't control the patterns...
|
|
165
|
+
// we can make each clause return a format that can be extrapolated and used in codegen...
|
|
163
166
|
function getObjectLoaderProperties(value, tableName) {
|
|
164
167
|
return {
|
|
165
168
|
clause: () => getTransformedReadClause(value),
|
package/testutils/db/temp_db.js
CHANGED
|
@@ -463,6 +463,9 @@ class TempDB {
|
|
|
463
463
|
async afterAll() {
|
|
464
464
|
if (this.dialect === db_1.Dialect.SQLite) {
|
|
465
465
|
this.sqlite.close();
|
|
466
|
+
if (!this.sqlite.memory) {
|
|
467
|
+
fs.rmSync(this.getSqliteClient().name);
|
|
468
|
+
}
|
|
466
469
|
return;
|
|
467
470
|
}
|
|
468
471
|
// end our connection to db
|
|
@@ -554,7 +557,6 @@ function setupSqlite(connString, tables, opts) {
|
|
|
554
557
|
}
|
|
555
558
|
afterAll(async () => {
|
|
556
559
|
await tdb.afterAll();
|
|
557
|
-
fs.rmSync(tdb.getSqliteClient().name);
|
|
558
560
|
delete process.env.DB_CONNECTION_STRING;
|
|
559
561
|
});
|
|
560
562
|
return tdb;
|