( schemaPath: string | string[], snapshot: SQLiteSchema, casing: CasingType | undefined, )
| 1022 | }; |
| 1023 | |
| 1024 | export const prepareLibSQLPush = async ( |
| 1025 | schemaPath: string | string[], |
| 1026 | snapshot: SQLiteSchema, |
| 1027 | casing: CasingType | undefined, |
| 1028 | ) => { |
| 1029 | const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath, casing); |
| 1030 | |
| 1031 | const validatedPrev = sqliteSchema.parse(prev); |
| 1032 | const validatedCur = sqliteSchema.parse(cur); |
| 1033 | |
| 1034 | const squashedPrev = squashSqliteScheme(validatedPrev, 'push'); |
| 1035 | const squashedCur = squashSqliteScheme(validatedCur, 'push'); |
| 1036 | |
| 1037 | const { sqlStatements, statements, _meta } = await applyLibSQLSnapshotsDiff( |
| 1038 | squashedPrev, |
| 1039 | squashedCur, |
| 1040 | tablesResolver, |
| 1041 | columnsResolver, |
| 1042 | sqliteViewsResolver, |
| 1043 | validatedPrev, |
| 1044 | validatedCur, |
| 1045 | 'push', |
| 1046 | ); |
| 1047 | |
| 1048 | return { |
| 1049 | sqlStatements, |
| 1050 | statements, |
| 1051 | squashedPrev, |
| 1052 | squashedCur, |
| 1053 | meta: _meta, |
| 1054 | }; |
| 1055 | }; |
| 1056 | |
| 1057 | const freeeeeeze = (obj: any) => { |
| 1058 | Object.freeze(obj); |
no test coverage detected