Baterka
Baterka
Explore posts from servers
DTDrizzle Team
Created by Baterka on 1/27/2024 in #help
SQL syntax error when using relations in MariaDB
Does anyone else have issue similar to this one? https://github.com/drizzle-team/drizzle-orm/issues/1100 I have this issue on MariaDB 10.4 and also on 11.2. This is my schema:
export const items = mysqlTable('items', {
id: int('id').autoincrement().primaryKey().notNull(),
...
})

export const itemsRelations = relations(items, ({ one }) => ({
trade: one(trades, { fields: [items.tradeId], references: [trades.id] }),
}));

export const trades = mysqlTable('trades', {
id: int('id').autoincrement().primaryKey().notNull(),
...
})

export const tradesRelations = relations(trades, ({ many }) => ({
items: many(items)
}))
export const items = mysqlTable('items', {
id: int('id').autoincrement().primaryKey().notNull(),
...
})

export const itemsRelations = relations(items, ({ one }) => ({
trade: one(trades, { fields: [items.tradeId], references: [trades.id] }),
}));

export const trades = mysqlTable('trades', {
id: int('id').autoincrement().primaryKey().notNull(),
...
})

export const tradesRelations = relations(trades, ({ many }) => ({
items: many(items)
}))
I am getting error:
42000', sqlMessage: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select coalesce(json_arrayagg(json_array(`trades_items`.`id`, `trades_items`...' at line 1"
42000', sqlMessage: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(select coalesce(json_arrayagg(json_array(`trades_items`.`id`, `trades_items`...' at line 1"
when doing trade query with with: {items: true}
10 replies
DTDrizzle Team
Created by Baterka on 1/19/2024 in #help
Getting TypeScript warnings where they should not be
No description
9 replies
CDCloudflare Developers
Created by Baterka on 1/18/2024 in #pages-help
Pages pricing for static React website
Hello. Today, I found out that I can use Cloudflare pages to host static website for free. I am long term Cloudflare DNS user and I know that there is no catch in there in terms of free DNS and proxying for my websites, but I am not sure why exactly Pages are also free? I am planning to host a static React based website and my question is if the Pages Free tier is really free for unlimited amount of requests in my case? Thanks!
10 replies