Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk insert/update we need it #13

Closed
hanumanjiblog opened this issue Jan 17, 2023 · 8 comments
Closed

Bulk insert/update we need it #13

hanumanjiblog opened this issue Jan 17, 2023 · 8 comments

Comments

@hanumanjiblog
Copy link

Bulk insert/update we need it please update the package

@rupamking1
Copy link

This feature is most important, please try to implement it

@G4brym
Copy link
Owner

G4brym commented Feb 8, 2023

I will try to make it this week 🙂

@G4brym
Copy link
Owner

G4brym commented Feb 10, 2023

I've just added bulk insert in the latest release

@rupamking1
Copy link

@G4brym Awesome ✨

@rupamking1
Copy link

Please try to implement bulk update, read and delete features. That will complete your bulk module.

@G4brym
Copy link
Owner

G4brym commented Feb 10, 2023

You can already do bulk update like this, to update unlimited rows

const updated = await qb.update({
  tableName: 'employees',
  data: {
    role: 'CEO',
    department: 'HQ',
  },
  where: {
    conditions: 'department = ?1',
    params: ['HQ'],
  },
})

and do bulk deletes like this, to delete unlimited rows

const updated = await qb.delete({
  tableName: 'employees',
  where: {
    conditions: 'department = ?1',
    params: ['HQ'],
  },
})

@rupamking1
Copy link

@G4brym db.batch may fix it.

@G4brym
Copy link
Owner

G4brym commented Jul 6, 2023

Hey @rupamking1 we added support for db.batch in the latest release thanks to @ejyager00
You can see an example here

@G4brym G4brym closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants