I tried date format in the where clause it showing me an error.
daily_check
WHERE (daily_checks
.qid
= question
.id
) AND (daily_check
.is_completed
= 1) AND (DATE_FORMAT(CONVERT_TZ(FROM_UNIXTIME(daily_check
.date
),'+00:00','+5:30'), '%d-%m-%Y') = '30-07-2023')) AS is_checked
FROM question
WHERE (restaurant_id
=1) AND (status
=1) AND (trash
=0) AND (category
=1) HAVING is_checked
= 0
...groupby multiple things
GROUP BY
u.user_id,
e.ExerciseID;
GROUP BY
u.user_id,
e.ExerciseID;
Unwrap the return type of a Subquery, native jsonAgg support or RQ Join Names?
Unform methods for result access
Cannot query DB table get `COALESCE types smallint and text cannot be matched`
Cannot Access Primary Key on Table
id
on the following table:
```ts
export const invites = mysqlTable(
"invites",...Typescript build fails, pointing to internal types.
onConflictDoNothing does not exist on planetscale client
Are relational queries supported on mysql?
Is there a way to write a query that orders and filters based on an array of possible options?
cannot set alias for composite primary key, getting (errno 1059) (sqlstate 42000) errors
Help with query writing
MySql NOW() in Drizzle
NOW()
function with Drizzle, rather than creating a new ts Date object and using that? Not that it matters much, but it would be good to keep everything in the db layer if possible. Apologies if I've missed this, I searched here, the reference docs site, and some READMEs on GitHub.Postgres: install plugin during migration
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
after creating the database.
...Introspect failing no pg_hba.conf entry for host
no pg_hba.conf entry for host
error. I am able to connect with TablePlus to the same db without issues.
As I'm attempting to also use ?ssl={"rejectUnauthorized":false}
to work around this I'm getting Cannot use 'in' operator to search for 'key' in {"rejectUnauthorized":false}
. Any hints on how I might get this one connected?...Is there a way I can use relational types?
with
parameter in the relational queries.
I've tried things like
```ts
type T = NonNullable<Parameters<typeof db.query.projects.findFirst>[0]>["with"];...Difference in using unique() on the column definition vs the index?
name: varchar('name', { length: 256 }).unique()
vs
`...Relational query problem
Error: relation "offers_details" does not exist
Error: relation "offers_details" does not exist
Error: relation "offers_details" does not exist