drizzle-cube 0.1.31 → 0.1.33

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.
@@ -3,6 +3,9 @@ import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
3
3
  import { MySql2Database } from 'drizzle-orm/mysql2';
4
4
  import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
5
5
  import { SQL } from 'drizzle-orm';
6
+ import { Subquery } from 'drizzle-orm';
7
+ import { Table } from 'drizzle-orm';
8
+ import { View } from 'drizzle-orm';
6
9
 
7
10
  /**
8
11
  * Abstract base class for database executors
@@ -22,10 +25,10 @@ export declare abstract class BaseDatabaseExecutor implements DatabaseExecutor {
22
25
  */
23
26
  export declare interface BaseQueryDefinition {
24
27
  /** Main table to query from */
25
- from: any;
28
+ from: QueryableRelation;
26
29
  /** Optional joins to other tables */
27
30
  joins?: Array<{
28
- table: any;
31
+ table: QueryableRelation;
29
32
  on: SQL;
30
33
  type?: 'left' | 'right' | 'inner' | 'full';
31
34
  }>;
@@ -490,6 +493,12 @@ export declare class PostgresExecutor extends BaseDatabaseExecutor {
490
493
  getEngineType(): 'postgres';
491
494
  }
492
495
 
496
+ /**
497
+ * Any queryable relation that can be used in FROM/JOIN clauses
498
+ * Supports tables, views, subqueries, and raw SQL expressions
499
+ */
500
+ export declare type QueryableRelation = Table | View | Subquery | SQL;
501
+
493
502
  export declare class QueryBuilder {
494
503
  private databaseAdapter;
495
504
  constructor(databaseAdapter: DatabaseAdapter);