Custom fields of db.query for many to many relationship for FE

Canging the value of a primary key that is referenced by foreign keys in other tables

Using drizzle with a DI container - which type to use? Getting error
export const db = drizzle(poolConnection); and my Inversify config is pretty simple: container.bind<MySql2Database>(TYPES.Database).toConstantValue(db);, and then my repository class constructor simply has a field @inject(TYPES.Database) private db: MySql2Database,. I'm pretty sure this is all a standard setup
I'm not getting any Typescript errors, but the dev server fails to run with this message:...
All values of query result are of type string
`Argument of type 'SQL<unknown>' is not assignable to parameter of type 'IndexColumn'.`
.on(lower(table.email)).
This is my code:
```ts
import { SQL, sql } from "drizzle-orm";
import {...D1_ERROR: near \"ilike\":
Raw SQL query (`.execute()` doesn't exist)
.execute() doesn't exist. Anyone got any leads?
```ts
import Database from "bun:sqlite"
import { drizzle } from "drizzle-orm/bun-sqlite"...limiting json_agg
json_agg
```js
const query = ctx.db
.select({...Custom aggregation column types
Introspect poor accuracy (SQLite/Turso)
query with one to many (postgres + foreign keys)
When and how to perform transactions
Drop DB
URL_PARAM_NOT_SUPPORTED using SQLite Cloud
sqlitecloud://g7yja3sra6.sqlite.cloud:8860?apikey=************* and when running drizzle-kit migrate I get that URL_PARAM_NOT_SUPPORTED: Unknown URL query parameter "apikey". Any ideas why this is? Isn't any query parameter allowed or something?...How do I make .returning() return only the inserted value instead of array
createResource to insert a single record. The result from .returning is an array. I am using neon postgres db
feedback on my database design (specially with relationships)

Deeply nested "with" param in query is failing
$inferSelect and $inferInsert doesn't return table types

Type Hinting $inferSelect
reviews table with an enum status field. When the status is assigned, the userId field is non-null, otherwise it's null.
Is there a way to typehint reviews.$inferSelect such that it adheres to the type logic above?...