imartinat
imartinat
WWasp-lang
Created by ColdBleach on 10/18/2023 in #đŸ™‹questions
Installing wasp error
Are you using Windows? if you are, here are some explanations on how to use Wasp on Windows : https://github.com/wasp-lang/wasp/issues/48
4 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
Thank you very much for your explanation. I am just testing now with SQLite so I will keep using loops. But it's good to know if I switch to PostgreSQL . Thanks again for your help!
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
Would it be possible to use createMany from Prisma? I tried to use it with context entities but I have a TypeError in the console :
`createMany is not a function
`createMany is not a function
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
Thank you very much. It now works.
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
export const createPrompt = async (args, context) => {

const promptList = [args.input1, args.input2, args.input3] ;
const results = await getOuputs(promptList);
//Loop through results to create a row in DB for each //prompt(input,output) in results.
for (var i = 0; i < results.length; i++) {
const prompt = results[0];
context.entities.Prompt.create({
data: { input: prompt.input, output:prompt.output }
});
export const createPrompt = async (args, context) => {

const promptList = [args.input1, args.input2, args.input3] ;
const results = await getOuputs(promptList);
//Loop through results to create a row in DB for each //prompt(input,output) in results.
for (var i = 0; i < results.length; i++) {
const prompt = results[0];
context.entities.Prompt.create({
data: { input: prompt.input, output:prompt.output }
});
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
In actions.js, I have :
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
I should rename to createPrompList
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
action createPrompt {
fn: import { createPrompt } from "@server/actions.js",
entities: [Prompt]
}
action createPrompt {
fn: import { createPrompt } from "@server/actions.js",
entities: [Prompt]
}
15 replies
WWasp-lang
Created by imartinat on 2/8/2023 in #đŸ™‹questions
Processing List to add in DB
Thanks for your quick answer, in my wasp file I have :
15 replies