McLean 25
McLean 25
Explore posts from servers
DTDrizzle Team
Created by McLean 25 on 10/12/2023 in #help
AWS Data API RDSDataClient Args in Production
Trying to wrap my head around how this should work in a lambda environment in production
const rdsClient = new RDSDataClient({
credentials: fromIni({ profile: process.env['PROFILE'] }),
region: "us-east-1",
});

const dataApiArgs = {
database: process.env["DB_SERVERLESS_NAME"]!,
secretArn: process.env["DB_SECRET_ARN"]!,
resourceArn: process.env["DB_RESOURCE_ARN"]!,
logger,
};

export const DB = dataApiDrizzle(rdsClient, dataApiArgs);
const rdsClient = new RDSDataClient({
credentials: fromIni({ profile: process.env['PROFILE'] }),
region: "us-east-1",
});

const dataApiArgs = {
database: process.env["DB_SERVERLESS_NAME"]!,
secretArn: process.env["DB_SECRET_ARN"]!,
resourceArn: process.env["DB_RESOURCE_ARN"]!,
logger,
};

export const DB = dataApiDrizzle(rdsClient, dataApiArgs);
Is the Lambda really supposed to have AWS CLI credentials?
3 replies
DTDrizzle Team
Created by McLean 25 on 9/2/2023 in #help
Studio with AWS Data API?
Is it possible to use Drizzle Studio with the AWS Data API, seeing as it doesn't have a true connection string (from what I understand).
2 replies
DTDrizzle Team
Created by McLean 25 on 6/7/2023 in #help
Sqlite insert returning typing help
5 replies
DTDrizzle Team
Created by McLean 25 on 5/3/2023 in #help
Select wildcard
I'm sure someone's asked this before but I can't find it. Is there not a way to do a .select() wildcard so that I can do something like:
db.select((defaultFields) => ({
max: sql<string>`MAX(${file.createdAt})`
...defaultFields
})).from(table);
db.select((defaultFields) => ({
max: sql<string>`MAX(${file.createdAt})`
...defaultFields
})).from(table);
4 replies
DTDrizzle Team
Created by McLean 25 on 4/5/2023 in #help
Return first or throw
I have a hard time believing this hasn't been asked yet, but my search results have yet to yield anything. Is it not possible (or planned) to do something like:
const firstItem = db.select().from(users).where(eq(users.id, userId)).takeFirstOrThrow()
const firstItem = db.select().from(users).where(eq(users.id, userId)).takeFirstOrThrow()
4 replies
DTDrizzle Team
Created by McLean 25 on 4/5/2023 in #help
Can't find meta/_journal.json file when running migrate
3 replies