jpcafe
jpcafe
DTDrizzle Team
Created by jpcafe on 3/11/2024 in #help
How can i implement ilike in sqlite?
ok this works
sql`lower(${Recipe.title}) like ${`%${filters.search.toLowerCase()}%`}`
sql`lower(${Recipe.title}) like ${`%${filters.search.toLowerCase()}%`}`
3 replies
DTDrizzle Team
Created by jpcafe on 3/11/2024 in #help
How can i implement ilike in sqlite?
then i could do something like like(ref('titleLower'), 'something'
3 replies
DTDrizzle Team
Created by jpcafe on 2/15/2024 in #help
Using default with `text` json mode creates empty `DEFAULT`
Ok thank you will try!
3 replies
DTDrizzle Team
Created by jpcafe on 5/20/2023 in #help
TS error: Argument of type PgTableWithColumns is not assignable to parameter of type AnyPgTable
i think the error is now gone i've installed from fresh!
4 replies
DTDrizzle Team
Created by jpcafe on 5/20/2023 in #help
TS error: Argument of type PgTableWithColumns is not assignable to parameter of type AnyPgTable
Repro extracted from the getting started docs
import { pgTable, serial, text, varchar } from 'drizzle-orm/pg-core';

export const users = pgTable('users', {
id: serial('id').primaryKey(),
fullName: text('full_name'),
phone: varchar('phone', { length: 256 })
});

import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';

const client = postgres('');
const db = drizzle(client);

const allUsers = await db.select().from(users);
import { pgTable, serial, text, varchar } from 'drizzle-orm/pg-core';

export const users = pgTable('users', {
id: serial('id').primaryKey(),
fullName: text('full_name'),
phone: varchar('phone', { length: 256 })
});

import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';

const client = postgres('');
const db = drizzle(client);

const allUsers = await db.select().from(users);
4 replies