doiská
doiská
DTDrizzle Team
Created by Tharaka on 5/1/2023 in #help
Inserting records into related tables
This way you dont need to wait three responses
9 replies
DTDrizzle Team
Created by Tharaka on 5/1/2023 in #help
Inserting records into related tables
Hi, i don't know if its a better approach, but you could predict the uniqueId in server-side, then make the three inserts.
9 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
Thanks @Siris @s1njar ^^
59 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
My esbuild config
entryPoints: [
'./src/server/index.ts'
],
outfile: './dist/server/server.js',
bundle: true,
sourcemap: true,
loader: {
'.ts': 'ts',
},
platform: 'node',
target: 'node16',
format: 'cjs',
external: ['drizzle-orm'],
define: {
'process.env.NODE_ENV': `"${process.env.NODE_ENV || 'development'}"`
},
plugins: [
esbuildDecorators({
tsconfig: './src/server/tsconfig.json'
})
],
tsconfig: './src/server/tsconfig.json',
entryPoints: [
'./src/server/index.ts'
],
outfile: './dist/server/server.js',
bundle: true,
sourcemap: true,
loader: {
'.ts': 'ts',
},
platform: 'node',
target: 'node16',
format: 'cjs',
external: ['drizzle-orm'],
define: {
'process.env.NODE_ENV': `"${process.env.NODE_ENV || 'development'}"`
},
plugins: [
esbuildDecorators({
tsconfig: './src/server/tsconfig.json'
})
],
tsconfig: './src/server/tsconfig.json',
59 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
I think I get it, my problem only happens when I bundle the drizzle-orm using esbuild. If i set it as externals, it works perfectly
59 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
If i use drizzle directly:
@NetPromise(TwitterEvents.TweetList)
async test() {

const response = await db
.select()
.from(twitterUsers)
.innerJoin(twitterActions, eq(twitterActions.id, twitterUsers.id));

console.log(response);

// return {
// status: 'ok',
// data: []
// }
}
@NetPromise(TwitterEvents.TweetList)
async test() {

const response = await db
.select()
.from(twitterUsers)
.innerJoin(twitterActions, eq(twitterActions.id, twitterUsers.id));

console.log(response);

// return {
// status: 'ok',
// data: []
// }
}
It gives me the error, but using an import, it works: import { getTweets } from "@server/apps/twitter/twitter-tweets.db";
@NetPromise(TwitterEvents.TweetList)
async test() {

const response = await getTweets();
console.log(response);

// return {
// status: 'ok',
// data: []
// }
}
@NetPromise(TwitterEvents.TweetList)
async test() {

const response = await getTweets();
console.log(response);

// return {
// status: 'ok',
// data: []
// }
}
59 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
The only way i made > 0.25 works was inside a iife, idk why
59 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
I tried removing it, no difference
59 replies
DTDrizzle Team
Created by thdxr on 4/4/2023 in #help
maximum call stack exceeded
And no, its not being used anywhere outside server.
59 replies