dzql 0.6.35 → 0.6.37

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dzql",
3
- "version": "0.6.35",
3
+ "version": "0.6.37",
4
4
  "description": "Database-first real-time framework with TypeScript support",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@ export function generateLookupFunction(name: string, entityIR: EntityIR): string
23
23
 
24
24
  // Build ILIKE conditions for searchable fields
25
25
  const searchConditions = searchable
26
- .map(field => `t.${field}::TEXT ILIKE $2`)
26
+ .map((field: string) => `t.${field}::TEXT ILIKE $2`)
27
27
  .join(' OR ');
28
28
 
29
29
  return `
@@ -59,4 +59,4 @@ BEGIN
59
59
  END;
60
60
  $$;
61
61
  `;
62
- }
62
+ }
@@ -185,6 +185,7 @@ export function generateIR(domain: DomainConfig): DomainIR {
185
185
  primaryKey: pk,
186
186
  columns,
187
187
  labelField: config.label || 'id',
188
+ searchable: config.searchable,
188
189
  softDelete: config.softDelete || false,
189
190
  managed: config.managed !== false, // Default to true, only false if explicitly set
190
191
  hidden: config.hidden || [],
package/src/shared/ir.ts CHANGED
@@ -136,6 +136,7 @@ export interface EntityIR {
136
136
  primaryKey: string[];
137
137
  columns: Array<{ name: string; type: string; isArray: boolean }>;
138
138
  labelField?: string;
139
+ searchable?: string[];
139
140
  softDelete?: boolean;
140
141
  managed?: boolean; // If false, skip CRUD function generation (for junction tables)
141
142
  hidden?: string[]; // Fields to exclude from query results (e.g., password_hash)