Skip to content

Add BSON column types #21

@Rodriguespn

Description

@Rodriguespn

Add support to BSON columns. To add a new column type:

Add the new column type to drizzle-orm/src/singlestore-core/columns

Add how the new type should be written on SIngleStore migration JSOn file in introspect-singlestore.ts

https://github.com/singlestore-labs/summer-hackathon-s2-drizzle-orm/blob/feature/add-bson-column-type/drizzle-kit/src/introspect-singlestore.ts#L10

https://github.com/singlestore-labs/summer-hackathon-s2-drizzle-orm/blob/feature/add-bson-column-type/drizzle-kit/src/introspect-singlestore.ts#L491

Add how the default value of the new type should be serialized: https://github.com/singlestore-labs/summer-hackathon-s2-drizzle-orm/blob/feature/add-bson-column-type/drizzle-kit/src/serializer/singlestoreSerializer.ts#L134

Add drizzle-kit to create a table with a column of the new type: https://github.com/singlestore-labs/summer-hackathon-s2-drizzle-orm/blob/feature/add-bson-column-type/drizzle-kit/tests/singlestore.test.ts#L512

Add a new type test with a table with a column of the new type or add a new column of the new type to the existing schemas in drizzle-orm/type-tests/singlestore/tables.ts: https://github.com/singlestore-labs/summer-hackathon-s2-drizzle-orm/blob/feature/add-bson-column-type/drizzle-orm/type-tests/singlestore/tables.ts#L33

Add it to one of the schemas on integration-tests/tests/singlestore/singlestore.test.ts

PR: singlestore-labs/s2-drizzle-orm-dev#8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions