Skip to content

Commit

Permalink
Fix build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiSherman committed Nov 25, 2024
1 parent b31050f commit 2552c03
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
3 changes: 1 addition & 2 deletions drizzle-orm/src/singlestore-core/columns/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import type {
ColumnBuilderRuntimeConfig,
ColumnDataType,
HasDefault,
HasGenerated,
IsAutoincrement,
MakeColumnConfig,
} from '~/column-builder.ts';
Expand Down Expand Up @@ -47,7 +46,7 @@ export abstract class SingleStoreColumnBuilder<

// TODO: Implement generated columns for SingleStore (https://docs.singlestore.com/cloud/create-a-database/using-persistent-computed-columns/)
/** @internal */
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SingleStoreGeneratedColumnConfig): HasGenerated<this> {
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SingleStoreGeneratedColumnConfig) {
this.config.generated = {
as,
type: 'always',
Expand Down
26 changes: 15 additions & 11 deletions drizzle-orm/type-tests/singlestore/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ Expect<
notNull: true;
hasDefault: true;
isPrimaryKey: true;
isAutoincrement: true;
hasRuntimeDefault: false;
enumValues: undefined;
baseColumn: never;
identity: undefined;
generated: undefined;
isAutoincrement: true;
hasRuntimeDefault: false;
}, object>;
name: SingleStoreColumn<{
name: 'name_db';
Expand All @@ -107,11 +108,12 @@ Expect<
notNull: true;
hasDefault: false;
isPrimaryKey: false;
isAutoincrement: false;
hasRuntimeDefault: false;
enumValues: [string, ...string[]];
baseColumn: never;
identity: undefined;
generated: undefined;
isAutoincrement: false;
hasRuntimeDefault: false;
}, object>;
population: SingleStoreColumn<{
name: 'population';
Expand All @@ -123,11 +125,12 @@ Expect<
notNull: false;
hasDefault: true;
isPrimaryKey: false;
isAutoincrement: false;
hasRuntimeDefault: false;
enumValues: undefined;
baseColumn: never;
identity: undefined;
generated: undefined;
isAutoincrement: false;
hasRuntimeDefault: false;
}, object>;
},
typeof cities._.columns
Expand Down Expand Up @@ -500,7 +503,6 @@ Expect<
Expect<
Equal<
{
brand: 'Column';
name: 'name';
tableName: 'table';
dataType: 'custom';
Expand All @@ -509,13 +511,15 @@ Expect<
driverParam: unknown;
notNull: true;
hasDefault: false;
enumValues: undefined;
baseColumn: never;
dialect: 'singlestore';
generated: undefined;
isPrimaryKey: false;
isAutoincrement: false;
hasRuntimeDefault: false;
enumValues: undefined;
baseColumn: never;
identity: undefined;
generated: undefined;
brand: 'Column';
dialect: 'singlestore';
},
Simplify<BuildColumn<'table', typeof t, 'singlestore'>['_']>
>
Expand Down

0 comments on commit 2552c03

Please sign in to comment.