Open versecafe opened 8 months ago
Add support for the SET type in the same manor as mysqlEnum, should be created the same way, example schema:
mysqlEnum
export const blogPostsTable = mysqlTable("posts", { title: varchar("title", { length: 255 }).notNull().primaryKey(), content: text("content").notNull(), slug: varchar("slug", { length: 255 }).notNull(), tags: mysqlSet("tags", ["javascript", "typescript", "react", "vue", "nextjs", "nuxt", "angular"]).notNull() });
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/set.html
Query
const posts: Post[] = await db .select() .from(blogPostsTable) .where(findInSet(blogPostsTable.tags, ["react", "nextjs"]));
SELECT * FROM posts WHERE FIND_IN_SET('react,nextjs',tags);
Just to add to it, drizzle-kit introspect also fails if a table has a set column defined in it.
Describe what you want
Add support for the SET type in the same manor as
mysqlEnum
, should be created the same way, example schema:MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/set.html
Query