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

Is bulk insert or batching supported #195

Closed
QuAzI opened this issue Apr 26, 2015 · 1 comment
Closed

Is bulk insert or batching supported #195

QuAzI opened this issue Apr 26, 2015 · 1 comment
Labels

Comments

@QuAzI
Copy link

QuAzI commented Apr 26, 2015

Can I insert multiple rows as one query?

public class article
{
    public long article_id { get; set; }
    public string title { get; set; }
    public DateTime date_created { get; set; }
    public bool draft { get; set; }
    public string content { get; set; }
}

var array = new article[100];
/* filling array */
db.Insert(array);

Which must be equivalent to the next query

INSERT INTO article (article_id, title , date_created, draft, content) 
VALUES
  (1, title , date_created, draft, content),
  /* all records */
  (100, title , date_created, draft, content);
@pleb pleb changed the title Multiple values stored in array or list insertion [Enhancement] Is bulk insert or batching supported Dec 4, 2015
@pleb pleb added the question label Dec 4, 2015
@pleb
Copy link
Member

pleb commented Dec 5, 2015

I'm sorry that your issue has been left for so long. In an effort to reboot PetaPoco your issue has been closed. If you think this is still a problem. Please feel free to open and another issue. Please pass the word on that PetaPoco is back. We're looking for people #204.

@pleb pleb closed this as completed Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants