@type32/tauri-sqlite-orm 0.1.18-14 → 0.1.18-16

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/index.d.mts CHANGED
@@ -65,7 +65,7 @@ declare class SelectQueryBuilder<TTable extends AnyTable, TSelectedColumns exten
65
65
  having(condition: SQLCondition): this;
66
66
  leftJoin<T extends AnyTable>(table: T, condition: SQLCondition, alias: string): this;
67
67
  innerJoin<T extends AnyTable>(table: T, condition: SQLCondition, alias: string): this;
68
- include(relations: Record<string, boolean>): this;
68
+ include(relations: Partial<Record<keyof TTable['relations'], boolean>>): this;
69
69
  private buildJoins;
70
70
  execute(): Promise<any[]>;
71
71
  private processRelationResults;
package/dist/index.d.ts CHANGED
@@ -65,7 +65,7 @@ declare class SelectQueryBuilder<TTable extends AnyTable, TSelectedColumns exten
65
65
  having(condition: SQLCondition): this;
66
66
  leftJoin<T extends AnyTable>(table: T, condition: SQLCondition, alias: string): this;
67
67
  innerJoin<T extends AnyTable>(table: T, condition: SQLCondition, alias: string): this;
68
- include(relations: Record<string, boolean>): this;
68
+ include(relations: Partial<Record<keyof TTable['relations'], boolean>>): this;
69
69
  private buildJoins;
70
70
  execute(): Promise<any[]>;
71
71
  private processRelationResults;
package/dist/index.js CHANGED
@@ -236,7 +236,12 @@ var SelectQueryBuilder = class extends BaseQueryBuilder {
236
236
  for (const [relationName, include] of Object.entries(this.includeRelations)) {
237
237
  if (!include) continue;
238
238
  const relation = this.table.relations[relationName];
239
- if (!relation) continue;
239
+ if (!relation) {
240
+ console.warn(
241
+ `[Tauri-ORM] Relation "${relationName}" not found on table "${this.table._.name}". Skipping include.`
242
+ );
243
+ continue;
244
+ }
240
245
  const foreignTable = relation.foreignTable;
241
246
  const foreignAlias = `${this.selectedTableAlias}_${relationName}`;
242
247
  this.selectedColumns.push(`${foreignAlias}.*`);
package/dist/index.mjs CHANGED
@@ -169,7 +169,12 @@ var SelectQueryBuilder = class extends BaseQueryBuilder {
169
169
  for (const [relationName, include] of Object.entries(this.includeRelations)) {
170
170
  if (!include) continue;
171
171
  const relation = this.table.relations[relationName];
172
- if (!relation) continue;
172
+ if (!relation) {
173
+ console.warn(
174
+ `[Tauri-ORM] Relation "${relationName}" not found on table "${this.table._.name}". Skipping include.`
175
+ );
176
+ continue;
177
+ }
173
178
  const foreignTable = relation.foreignTable;
174
179
  const foreignAlias = `${this.selectedTableAlias}_${relationName}`;
175
180
  this.selectedColumns.push(`${foreignAlias}.*`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@type32/tauri-sqlite-orm",
3
- "version": "0.1.18-14",
3
+ "version": "0.1.18-16",
4
4
  "description": "A Drizzle-like ORM for Tauri v2's SQL JS API plugin.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",