Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta #3916

Merged
merged 28 commits into from
Jan 16, 2025
Merged

Beta #3916

Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c352347
Replace `zx` with native `child_process`
kravetsone Aug 1, 2024
90e0d88
Merge branch 'drizzle-team:main' into replace-zx-with-child-process
kravetsone Aug 1, 2024
9ceed7c
Merge branch 'main' into replace-zx-with-child-process
kravetsone Oct 25, 2024
fc2c675
DROP INDEX does not include PG Schema prefix
WaciX Dec 29, 2024
32456cb
Fix minor typo (bacth → batch)
stephan281094 Jan 5, 2025
93e8b54
fix: Fix certs util
RomanNabukhotnyi Jan 6, 2025
2329e17
dprint
RomanNabukhotnyi Jan 6, 2025
c4ae5d8
implement vector type, start tests
mitchwadair Dec 16, 2024
fc20e35
lint fix, fix test/introspection
mitchwadair Dec 17, 2024
c37de3a
fix types
mitchwadair Dec 18, 2024
54f4fe6
more type changes, test not actually fixed :/
mitchwadair Dec 18, 2024
cb41edf
simplify vector class
mitchwadair Dec 18, 2024
8a13fab
fix attw
mitchwadair Jan 6, 2025
9d1aac1
disable console verbosity
RomanNabukhotnyi Jan 7, 2025
de3c537
up version
RomanNabukhotnyi Jan 7, 2025
44616e9
Merge pull request #3909 from drizzle-team/certs
AndriiSherman Jan 8, 2025
eba87c6
Merge pull request #3792 from singlestore-labs/feature/vector-type
AndriiSherman Jan 8, 2025
629b5aa
Merge pull request #3904 from stephan281094/patch-1
AndriiSherman Jan 8, 2025
4a4629c
Merge branch 'beta' into issue-3703
AndriiSherman Jan 8, 2025
8e428d1
Merge pull request #3866 from WaciX/issue-3703
AndriiSherman Jan 8, 2025
8ca38a9
Merge branch 'main' into replace-zx-with-child-process
AlexBlokh Jan 16, 2025
570c506
fix: Fix certs util
RomanNabukhotnyi Jan 16, 2025
f9ee2aa
Merge branch 'beta' into replace-zx-with-child-process
RomanNabukhotnyi Jan 16, 2025
bd7c23e
Merge pull request #2734 from kravetsone/replace-zx-with-child-process
AlexBlokh Jan 16, 2025
15cd998
Up orm version
AndriiSherman Jan 16, 2025
0350a59
switch off PS tests for now
AndriiSherman Jan 16, 2025
471d797
remove js-tests for PS as well
AndriiSherman Jan 16, 2025
9927cf1
forgot 1 more PS test
AndriiSherman Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify vector class
  • Loading branch information
mitchwadair committed Jan 6, 2025
commit cb41edfde6b340b71ced217c1e91fe660f96a05f
19 changes: 9 additions & 10 deletions drizzle-orm/src/singlestore-core/columns/vector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ export class SingleStoreVectorBuilder<T extends ColumnBuilderBaseConfig<'array',
override build<TTableName extends string>(
table: AnySingleStoreTable<{ name: TTableName }>,
): SingleStoreVector<MakeColumnConfig<T, TTableName>> {
return new SingleStoreVector(table, this.config as ColumnBuilderRuntimeConfig<any, any>);
return new SingleStoreVector<MakeColumnConfig<T, TTableName>>(
table,
this.config as ColumnBuilderRuntimeConfig<any, any>,
);
}
}

export class SingleStoreVector<T extends ColumnBaseConfig<'array', 'SingleStoreVector'>> extends SingleStoreColumn<T> {
export class SingleStoreVector<T extends ColumnBaseConfig<'array', 'SingleStoreVector'>>
extends SingleStoreColumn<T, SingleStoreVectorConfig>
{
static override readonly [entityKind]: string = 'SingleStoreVector';

readonly dimensions: number;
readonly elementType: ElementType | undefined;

constructor(table: AnySingleStoreTable<{ name: T['tableName'] }>, config: SingleStoreVectorBuilder<T>['config']) {
super(table, config);
this.dimensions = config.dimensions;
this.elementType = config.elementType;
}
dimensions: number = this.config.dimensions;
elementType: ElementType | undefined = this.config.elementType;

getSQLType(): string {
return `vector(${this.dimensions}, ${this.elementType || 'F32'})`;
Expand Down