asch
Explore posts from serversDTDrizzle Team
•Created by asch on 8/29/2024 in #help
Does drizzle support querying across multiple mysql databases (same mysql server)?
Here's some 'rough' code to demonstrate what I'm attempting to do... basically I have tables in two mysql databases (same mysql server). I can write SQL to query data from tables in different databases, but am struggling to get drizzle to do it. I saw that drizzle allows defining the database with mysqlSchema().
Looking at the query that is being generated, it is not using the mysql database (mysqlSchema). When the query is generated, it thinks both tables in the same mysql database (mysqlSchema).
Maybe the 'rqb' doesn't support multiple databases or does drizzle not support querying across them yet?
5 replies
How to insert into all values (and columns) from another table / view?
I realize I could write the raw sql, however I was curious how I would go about creating the following insert statement using kysely.
insert into <table>
select * from <view_or_table>
I was looking over https://kysely-org.github.io/kysely/classes/InsertQueryBuilder.html#values but haven't been able to figure it out.
4 replies