alka_99
alka_99
Explore posts from servers
CDCloudflare Developers
Created by alka_99 on 7/5/2024 in #general-help
Alternative way to connect cloudflare tunnel
Hi Guys I have my own local development server in my home, the questions is how i can connect into it using cloudflare tunnel. but in my client pc i can't install cloudflare tunnel since it is locked up by my company admin. is there any other options?
2 replies
DTDrizzle Team
Created by alka_99 on 6/22/2024 in #help
Cannot find package 'drizzle-orm' in sveltekit docker
No description
4 replies
CDCloudflare Developers
Created by alka_99 on 5/11/2024 in #pages-help
Email Provider compatible with cloudflare pages
No description
3 replies
DTDrizzle Team
Created by alka_99 on 5/11/2024 in #help
how to make date in timestamp
No description
2 replies
DTDrizzle Team
Created by alka_99 on 3/18/2024 in #help
Auto Increment custom id with prefix GRO
Hi guys. New here, anyone know how to create custom id where i want to have GRO0001 GRO0002 and so on with prefix GRO and the numbers will be auto increment.
11 replies
DTDrizzle Team
Created by alka_99 on 2/26/2024 in #help
Multiple orderby in single relation
Hi Guys I want to know how to do multiple sort like for example there is 2 column called priority and created_at. If priority is filled or not null or not = 0 it will use the priority If priority is not filled or null or = 0 it will use created_at here is my code
const result = await db.query.property.findFirst({
with: {
content: {
with: {
photos: {
orderBy: (photos, { desc }) => [desc(photos.priority)]},
facilities: true
}
},
room_type: {
with: {
rate_plans: true
}
},
},
where: (property, { eq }) => eq(property.slug, slug),
});
const result = await db.query.property.findFirst({
with: {
content: {
with: {
photos: {
orderBy: (photos, { desc }) => [desc(photos.priority)]},
facilities: true
}
},
room_type: {
with: {
rate_plans: true
}
},
},
where: (property, { eq }) => eq(property.slug, slug),
});
i only able to do one
1 replies
DTDrizzle Team
Created by alka_99 on 2/18/2024 in #help
Allow null in integer
No description
2 replies
CDCloudflare Developers
Created by alka_99 on 2/17/2024 in #pages-help
Error: Cannot perform I/O on behalf of a different request
Hi Everyone I have a project where i'm using sveltekit but i had a problem where when clicking back or forward in the browser is causing internal error 500? after i get the internal error 500 i try to refresh (ctrl + r) it went normal. I have 2 webapps that have this issues, and weirdly its happening in the production build that i already deploy in the cloudflare pages, dev and local build environment is fine. i see the logs and i got
Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance.
Error: Cannot perform I/O on behalf of a different request. I/O objects (such as streams, request/response bodies, and others) created in the context of one request handler cannot be accessed from a different request's handler. This is a limitation of Cloudflare Workers which allows us to improve overall performance.
17 replies
CDCloudflare Developers
Created by alka_99 on 2/10/2024 in #pages-help
Error during build time in cloudflare page
No description
1 replies
DTDrizzle Team
Created by alka_99 on 2/10/2024 in #help
Cant query with relation using query method
No description
6 replies
DTDrizzle Team
Created by alka_99 on 2/8/2024 in #help
TypeError: db.update(...).values is not a function
Hi Guys New here in drizzle. I'm using sveltekit, and i try to create somekind of update/edit form but i get this error TypeError: db.update(...).values is not a function
import type { Actions } from './$types.ts';
import * as schema from '$lib/schema.js';
import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';
import { PUBLIC_DRIZZLE_DATABASE_URL } from '$env/static/public';
import { fail } from '@sveltejs/kit';

const sql = postgres(PUBLIC_DRIZZLE_DATABASE_URL!);
const db = drizzle(sql, { schema: schema });

export const actions: Actions = {
update: async ({ request }) => {
const body = Object.fromEntries(await request.formData());
console.log(body, 'testttt');
if (!body) {
return fail(400, {
error: 'Something went wrong'
})
}
await db.update(schema.property).values(body).where(eq(schema.property.id, body.id))
},
};
import type { Actions } from './$types.ts';
import * as schema from '$lib/schema.js';
import { drizzle } from 'drizzle-orm/postgres-js';
import postgres from 'postgres';
import { PUBLIC_DRIZZLE_DATABASE_URL } from '$env/static/public';
import { fail } from '@sveltejs/kit';

const sql = postgres(PUBLIC_DRIZZLE_DATABASE_URL!);
const db = drizzle(sql, { schema: schema });

export const actions: Actions = {
update: async ({ request }) => {
const body = Object.fromEntries(await request.formData());
console.log(body, 'testttt');
if (!body) {
return fail(400, {
error: 'Something went wrong'
})
}
await db.update(schema.property).values(body).where(eq(schema.property.id, body.id))
},
};
2 replies
DTDrizzle Team
Created by alka_99 on 2/6/2024 in #help
TypeError: client.unsafe is not a function
Hi Guys I got a challenge where it said TypeError: client.unsafe is not a function. so basically i was switching from neondb to supabase, in the drizzle documentations i need to use postgres.js as the packages and remove @Neondatabase/serverless. but i relized because im using cloudflare pages, that postgres.js is not edge compatible although there is workaround using
compatibility_flags = ["nodejs_compat"]
compatibility_flags = ["nodejs_compat"]
but i just do some experimentation to use @Neondatabase/serverless with supabase db, has anyone tried it?? I try it but i get error: TypeError: client.unsafe is not a function. although using nodejs_compat is fine, i just want to remove too much complexity because im still begineer and it's more neat not to use nodejs_compat
2 replies
DTDrizzle Team
Created by alka_99 on 2/4/2024 in #help
migration:pg is not adding my new table
HI guys, I encountered an issues where the console says: No schema changes, nothing to migrate 😴 when in fact i add new 2 tables: userTable and sessionTable
3 replies
DTDrizzle Team
Created by alka_99 on 1/27/2024 in #help
How to not loss data everytime i change the schema
No description
4 replies
DTDrizzle Team
Created by alka_99 on 1/26/2024 in #help
How to access multiple relations in query
No description
6 replies
RRefine
Created by correct-apricot on 1/21/2024 in #ask-any-question
Supabase and RBAC
How to implement supabase and RBAC in refine?
19 replies
CDCloudflare Developers
Created by alka_99 on 1/13/2024 in #workers-help
How to put environment variables in wrangler
No description
4 replies
RRefine
Created by wise-white on 12/30/2023 in #ask-any-question
how to swizzle simple-rest and add authentication header
any idea how to swizzle simple-rest and add authentication header??
20 replies
RRefine
Created by extended-salmon on 12/30/2023 in #ask-any-question
Get data from api and then push to supabase
is that possible to use refine to get data from an api and then push it to supabase?
24 replies
RRefine
Created by optimistic-gold on 12/29/2023 in #ask-any-question
Advise for CRUD apps for small startup project
I'm looking for an advise for my small startup project, recently i was looking refine due to the nature of scaffold and all of its convinent components 1. however we confuse where we can start is it better to go with next js or remix? 2. our backend, db and auth using supabase 3. so the use case is i want to build crud apps for 2 main different parties (1st is my team, 2nd is my partners/client) (role: super admin, viewer, editor, partner/client) 4. i will need, multi role/RBAC, localization or i18n, calendar (because for hotel and property renting). 5. design i think i will go with mantine 6. deploying options: aws, gcp, vercell, netlify, cloudflare, etc. anything is fine. cheaper is better 7. easy for begineer
17 replies