Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
drodrigues4 committed Jul 23, 2024
1 parent 5bce7e5 commit f098654
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
22 changes: 10 additions & 12 deletions drizzle-orm/src/singlestore-core/columns/guid.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ColumnBaseConfig } from '~/column';
import { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder';
import { entityKind } from '~/entity';
import { AnySingleStoreTable } from '~/singlestore-core/table';
import { sql } from '~/sql/sql';
import { Equal } from '~/utils';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common';
import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder';
import type { ColumnBaseConfig } from '~/column.ts';
import { entityKind } from '~/entity.ts';
import type { AnySingleStoreTable } from '~/singlestore-core/table';
import { sql } from '~/sql/sql.ts';
import type { Equal } from '~/utils';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';

export type SingleStoreGUIDBuilderInitial<TName extends string> = SingleStoreGUIDBuilder<{
name: TName;
Expand All @@ -21,7 +21,7 @@ export class SingleStoreGUIDBuilder<T extends ColumnBuilderBaseConfig<'buffer',
{
static readonly [entityKind]: string = 'SingleStoreGUIDBuilder';

constructor(name: T['name'], config?: SingleStoreGUIDConfig) {
constructor(name: T['name'], _config?: SingleStoreGUIDConfig) {
super(name, 'buffer', 'SingleStoreGUID');
}

Expand Down Expand Up @@ -64,7 +64,7 @@ export class SingleStoreGUIDStringBuilder<T extends ColumnBuilderBaseConfig<'str
{
static readonly [entityKind]: string = 'SingleStoreGUIDStringBuilder';

constructor(name: T['name'], config?: SingleStoreGUIDConfig) {
constructor(name: T['name'], _config?: SingleStoreGUIDConfig) {
super(name, 'string', 'SingleStoreGUIDString');
}

Expand Down Expand Up @@ -95,9 +95,7 @@ export class SingleStoreGUIDString<T extends ColumnBaseConfig<'string', 'SingleS

override mapFromDriverValue(value: Uint8Array): string {
const hex = Buffer.from(value).toString('hex');
return `${hex.substring(0, 8)}-${hex.substring(8, 12)}-${hex.substring(12, 16)}-${hex.substring(16, 20)}-${
hex.substring(20)
}`;
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
}
}

Expand Down
10 changes: 5 additions & 5 deletions drizzle-orm/src/singlestore-core/columns/uuid.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ColumnBaseConfig } from '~/column';
import { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder';
import { entityKind } from '~/entity';
import { AnySingleStoreTable } from '~/singlestore-core/table';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common';
import type { ColumnBaseConfig } from '~/column';
import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder';
import { entityKind } from '~/entity.ts';
import type { AnySingleStoreTable } from '~/singlestore-core/table';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';

export type SingleStoreUUIDBuilderInitial<TName extends string> = SingleStoreUUIDBuilder<{
name: TName;
Expand Down
10 changes: 5 additions & 5 deletions drizzle-orm/src/singlestore-core/columns/vector.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ColumnBaseConfig } from '~/column';
import { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder';
import { entityKind } from '~/entity';
import { AnySingleStoreTable } from '~/singlestore-core/table';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common';
import type { ColumnBaseConfig } from '~/column';
import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder';
import { entityKind } from '~/entity.ts';
import type { AnySingleStoreTable } from '~/singlestore-core/table';
import { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';

export type SingleStoreVectorBuilderInitial<TName extends string> = SingleStoreVectorBuilder<{
name: TName;
Expand Down

0 comments on commit f098654

Please sign in to comment.