@dbml/parse 8.3.1 → 8.4.0-alpha.1

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.
@@ -30,7 +30,7 @@ export default class Compiler {
30
30
  validateFile: (filepath: Filepath) => import('../core/types/report').default<void>;
31
31
  nodeFullname: (node: SyntaxNode) => import('../core/types/report').default<string[] | undefined> | import('../core/types/report').default<typeof import('..').UNHANDLED>;
32
32
  nodeAlias: (node: SyntaxNode) => import('../core/types/report').default<typeof import('..').UNHANDLED> | import('../core/types/report').default<string | undefined>;
33
- nodeSettings: (node: SyntaxNode) => import('../core/types/report').default<typeof import('..').UNHANDLED> | import('../core/types/report').default<import('../core/utils/validate').Settings>;
33
+ nodeSettings: (node: SyntaxNode) => import('../core/types/report').default<import('../core/utils/validate').Settings> | import('../core/types/report').default<typeof import('..').UNHANDLED>;
34
34
  canonicalName: (filepath: Filepath, symbol: import('../core/types/symbol').NodeSymbol) => import('../core/types/report').default<import('./queries/canonicalName').CanonicalName | undefined>;
35
35
  bindNode: (node: SyntaxNode) => import('../core/types/report').default<typeof import('..').UNHANDLED> | import('../core/types/report').default<void>;
36
36
  bindFile: (filepath: Filepath) => import('../core/types/report').default<void>;
@@ -2,25 +2,12 @@ import { default as Compiler } from '../../../../../compiler/index';
2
2
  import { CompileWarning } from '../../../../types/errors';
3
3
  import { RecordValue, TableRecord } from '../../../../types/schemaJson';
4
4
  import { ColumnSymbol } from '../../../../types/symbol';
5
- export interface ColumnInfo {
6
- name: string;
7
- pk: boolean;
8
- unique: boolean;
9
- increment: boolean;
10
- notNull: boolean;
11
- dbdefault?: {
12
- value: string | number;
13
- type: string;
14
- };
15
- typeName: string;
16
- }
17
- export declare function columnInfoFromSymbol(col: ColumnSymbol, compiler: Compiler): ColumnInfo;
18
5
  export declare function toKeyedRows(record: TableRecord): Record<string, RecordValue>[];
19
6
  export declare function makeTableKey(schema: string | null, table: string): string;
20
- export declare function extractKeyValueWithDefault(row: Record<string, RecordValue>, columnNames: string[], columns?: (ColumnInfo | undefined)[]): string;
21
- export declare function hasNullWithoutDefaultInKey(row: Record<string, RecordValue>, columnNames: string[], columns?: (ColumnInfo | undefined)[]): boolean;
22
- export declare function isAutoIncrementColumn(column: ColumnInfo): boolean;
7
+ export declare function extractKeyValueWithDefault(compiler: Compiler, row: Record<string, RecordValue>, columns: ColumnSymbol[]): string;
8
+ export declare function hasNullWithoutDefaultInKey(compiler: Compiler, row: Record<string, RecordValue>, columns: ColumnSymbol[]): boolean;
23
9
  export declare function formatFullColumnName(schemaName: string | null, tableName: string, columnName: string): string;
24
10
  export declare function formatFullColumnNames(schemaName: string | null, tableName: string, columnNames: string[]): string;
25
- export declare function formatValues(row: Record<string, RecordValue>, columnNames: string[]): string;
11
+ export declare function formatValues(compiler: Compiler, row: Record<string, RecordValue>, columns: ColumnSymbol[]): string;
12
+ export declare function getDiagnosticAnchorValues(row: Record<string, RecordValue>, columnNames: string[]): RecordValue[];
26
13
  export declare function createConstraintWarning(compiler: Compiler, recordValue: RecordValue, message: string): CompileWarning;
@@ -150,6 +150,7 @@ export declare class ColumnSymbol extends NodeSymbol {
150
150
  pk(compiler: Compiler): boolean;
151
151
  unique(compiler: Compiler): boolean;
152
152
  nullable(compiler: Compiler): boolean | undefined;
153
+ isIncrementSet(compiler: Compiler): boolean;
153
154
  increment(compiler: Compiler): boolean;
154
155
  default(compiler: Compiler): {
155
156
  type: 'number' | 'string' | 'boolean' | 'expression';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/parse",
4
- "version": "8.3.1",
4
+ "version": "8.4.0-alpha.1",
5
5
  "description": "DBML parser v2",
6
6
  "author": "Holistics <dev@holistics.io>",
7
7
  "license": "Apache-2.0",
@@ -50,5 +50,5 @@
50
50
  "engines": {
51
51
  "node": ">=18"
52
52
  },
53
- "gitHead": "b062d22d3608d8bb2969051721237cf5de28e069"
53
+ "gitHead": "a3615d8437f4a54a7d5ff5df96977c541394c203"
54
54
  }