⚡Z.E.U.S⚡
⚡Z.E.U.S⚡
DTDrizzle Team
Created by bobmusinex on 10/18/2024 in #help
Drizzle Studio fails to run due to TypeError
@bobmusinex Hi! You need to replace field with fields.
6 replies
DTDrizzle Team
Created by GaGex on 10/18/2024 in #help
what are the last 2 ? is it becuase im using relations?
Yes
2 replies
DTDrizzle Team
Created by powerhousejnr248 on 9/23/2024 in #help
Minified React error #310
@powerhousejnr248 Hi! This should be fixed.
2 replies
DTDrizzle Team
Created by Cong on 9/23/2024 in #help
Unexpected Error When Using Drizzle Studio
@Cong Hi! This should be fixed.
3 replies
DTDrizzle Team
Created by Macklin on 9/20/2024 in #help
Relations not working when clicked in Drizzle Studio - React Minified Error #310
@Macklin @UncleBensRice @megamindat Hi! This should be fixed.
8 replies
DTDrizzle Team
Created by Slime on 9/13/2024 in #help
invalid input either "url" or "host
Hey! Can you try deleting node_modules and reinstalling?
14 replies
DTDrizzle Team
Created by C-Weed on 9/3/2024 in #help
drizzle studio blocked over http
@C-Weed Hey! Try installing mkcert
2 replies
DTDrizzle Team
Created by Don Cezar on 9/2/2024 in #help
Drizzle Studio stuck at 'connecting to localhost:4983'
Not yet.
71 replies
DTDrizzle Team
Created by Don Cezar on 9/2/2024 in #help
Drizzle Studio stuck at 'connecting to localhost:4983'
What did you do?
71 replies
DTDrizzle Team
Created by Don Cezar on 9/2/2024 in #help
Drizzle Studio stuck at 'connecting to localhost:4983'
Are there any errors in cli?
71 replies
DTDrizzle Team
Created by Don Cezar on 9/2/2024 in #help
Drizzle Studio stuck at 'connecting to localhost:4983'
Yes, but without docker
71 replies
DTDrizzle Team
Created by Don Cezar on 9/2/2024 in #help
Drizzle Studio stuck at 'connecting to localhost:4983'
Only the studio server works locally.
71 replies
DTDrizzle Team
Created by Don Cezar on 9/2/2024 in #help
Drizzle Studio stuck at 'connecting to localhost:4983'
@Don Cezar Hey! I think you need to add host to the studio command and expose port 4983
71 replies
DTDrizzle Team
Created by SKDown on 7/30/2024 in #help
Dropping tables using Drizzle studio extension on planet scale
@SKDown Only if you want it
3 replies
DTDrizzle Team
Created by rocity on 7/30/2024 in #help
Drizzle Studio "unknown is not defined"
@rocity @sixfalls Hey! This should be fixed, try it.
3 replies
DTDrizzle Team
Created by Marcel Overdijk on 7/31/2024 in #help
Dynamically adding joins based on relation?
Maybe something like this?
function withCountries<T extends PgSelect>(qb: T) {
return qb.leftJoin(countryTable, eq(circuitTable.countryId, countryTable.id));
}

const sortFields: Record<string, Column> = {
'id': circuitTable.id,
'name': circuitTable.name,
'placeName': circuitTable.placeName,
'countryId': circuitTable.countryId,
'countryName': countryTable.name,
};

const field = 'countryName';

let baseQuery = ctx.mydb
.select()
.from(circuitTable)
.$dynamic();

const sortField = sortFields[field];
if (sortField.table === countryTable) {
baseQuery = withCountries(baseQuery);
}

...
function withCountries<T extends PgSelect>(qb: T) {
return qb.leftJoin(countryTable, eq(circuitTable.countryId, countryTable.id));
}

const sortFields: Record<string, Column> = {
'id': circuitTable.id,
'name': circuitTable.name,
'placeName': circuitTable.placeName,
'countryId': circuitTable.countryId,
'countryName': countryTable.name,
};

const field = 'countryName';

let baseQuery = ctx.mydb
.select()
.from(circuitTable)
.$dynamic();

const sortField = sortFields[field];
if (sortField.table === countryTable) {
baseQuery = withCountries(baseQuery);
}

...
7 replies
DTDrizzle Team
Created by Roni5 on 8/10/2024 in #help
drizzle studio not working neon
@Roni5 Hey! Do you use any env in drizzle.config.ts?
2 replies
DTDrizzle Team
Created by Marcel Overdijk on 8/26/2024 in #help
[sqlite] How to order by rowid?
@Marcel Overdijk Hey! Try:
db.query.countryTable.findAll({
where: eq(countryTable.continentId, continentId),
orderBy: asc(sql`rowid`)
})
db.query.countryTable.findAll({
where: eq(countryTable.continentId, continentId),
orderBy: asc(sql`rowid`)
})
4 replies