Amur
Explore posts from serversCDCloudflare Developers
•Created by Amur on 4/8/2025 in #general-help
Replacing Cloudfront with Cloudflare
Hey! At my company we heavily rely on AWS services but we are currently considering using some Cloudflare services as well since people are saying a lot of good things about them. As the first step I’m investing how could we leverage Cloudflare as a CDN instead of AWS cloudfront. We usually have Cloudfront in front of API Gateway for our BFF and then we also use Cloudfront in front of an S3 bucket where the frontend code is hosted. Are there any tutorials that i should look at? Or anyone has any pointers/recommendations/tips?
1 replies
DTDrizzle Team
•Created by Amur on 2/5/2025 in #help
Conditional queries with $dynamic
Is there a way to not execute the query yet within the if statement?
2 replies
DTDrizzle Team
•Created by Amur on 4/12/2024 in #help
Connection hangs in AWS Lambda when using response streaming

1 replies
DTDrizzle Team
•Created by Amur on 3/26/2024 in #help
Ignore foreign key violation on bulk insert
Is there a way to just skip the value, or even better make it null if one of the values from a bulk insert vauses a
foreign key violation
error
for example i have this code, and the second element as a recipeId that doesn't exist so i would get a foreign key violation
error
Is there a way to just skip the second element or make recipeId null for the second element (recipeId is a nullable field)
1 replies
DTDrizzle Team
•Created by Amur on 2/22/2024 in #help
Postgrest inserting json array results in stringified array
I'm trying to insert a an array of objects as a json array but it always ends up being strinfied
if it would be just a json then i can do
sql
${recipeData.notes}::jsonb` but that doesn't work with arrays (
cannot cast type record to jsonb`)5 replies
DTDrizzle Team
•Created by Amur on 2/20/2024 in #help
Drizzle-zod not inferring array field as array

1 replies
TTCTheo's Typesafe Cult
•Created by Amur on 11/22/2023 in #questions
Can't delete globally installed npm package
i want to delete the serverless.js npm package that's installed globally
if i run
serverless --version
i see that there is a version installed globally
if i run npm ls -g
it's not in the list
I switched to all installed node versions, checked npm ls -g for all but serverless wasn't in the list for any of them
I'm thinking, maybe i installed serverless.js globally when i was still using nvm instead of fnm
Is there a way to check the globally installed npm packages that were installed when i was using nvm ? 🤔2 replies
TTCTheo's Typesafe Cult
•Created by Amur on 11/6/2023 in #questions
Can npx execute packages without having the package installed?
In a lot of places i see people saying that npx can execute packages without instlalling them but whenever i try to exeute a package i get
Need to install the following packages
.
example
npx cowsay 'wow'
3 replies
DTDrizzle Team
•Created by Amur on 9/15/2023 in #help
Add drizzle-kit check as a pre-commit hook
Is there a way to add drizzle-kit check as a pre-commit hook with husky that would actually prevent the commit if something is wrong with my migrations? Currently i can add it but it won't prevent commiting
1 replies
DTDrizzle Team
•Created by Amur on 9/6/2023 in #help
Type of `tx` when using `db.transactions`
I want to use helper functions within
db.transactions
but I can't get the type of tx
working
so basically i don't know how to type tx
in the updateUserNotifications
function
19 replies
DTDrizzle Team
•Created by Amur on 9/6/2023 in #help
Update relationship within 1 query
is it possible to update relationships?
for example i have a one to one relationship between users and notifications but i couldn't find any example of how i could update the notifications of a user in 1 query
same question goes for many to many relationships
lets say i have a many to many between users and interests
i want to update the user attributes and the interests of the user
do i have to:
1. update user attributes
2. delete the current interests of the user from the association table
3. insert updated interests of the user
5 replies
DTDrizzle Team
•Created by Amur on 8/29/2023 in #help
Is it possible to do lateral sub-query join without relational queries?
I'm trying to rewrite the same query that the relation query builder does behind the scenes but not sure if it's possible
If i log the query this is what i get
I would like to do the same logic with the query builder becauase the relational queries there are certain things i cant do
3 replies
DTDrizzle Team
•Created by Amur on 8/22/2023 in #help
DB connections hangs after successful execution in Lambda locally
I'm testing my lambda functions locally with
sls invoke local -f hello
.
after returning a success response, my execution doesnt end
attached a video that shows the behaviour
if i remove the db query then it works fine22 replies
DTDrizzle Team
•Created by Amur on 8/10/2023 in #help
Error: Can't find meta/_journal.json file when trying to apply migrations in a lambda

11 replies
DTDrizzle Team
•Created by Amur on 7/24/2023 in #help
order by array_position does not order the records in postgres
Using array_positions either throws error or ignores the order
If i try to do it this way i get an function array_position(record, character varying) does not exist error
If i join the array elements then I don't get an error but the order does not change
However, If I hardcode the ids I get the correct order
2 replies
DTDrizzle Team
•Created by Amur on 7/10/2023 in #help
Including more than 1 relation in query throws error
If i try to include more than 1 relation i get an error 👇
This is the query 👇
If i remove either
editions: true
or publisher: true
then it works2 replies
DTDrizzle Team
•Created by Amur on 7/7/2023 in #help
Create database if not exists
Is there a way to have create a database if it not exists? After i create my schema and a run the first migration, i would expect drizzle to create a database that's specified in my connection string if it doesn't exist
3 replies