On Feb 6, 2017, at 10:36 PM, Niti Agarwal <n...@ionosnetworks.com> wrote:

> I read about SQLITE_MAX_SQL_LENGTH,

If this is why you’re making many transactions, there’s no requirement that all 
of the SQL that’s part of a single transaction be in a single SQL string given 
to the DB.  You can execute a bare “BEGIN TRANSACTION” SQL statement, do your 
10 million separate insert statements, and then execute a COMMIT statement, at 
which time all of the rows will be visible to other users of that DB.

This is simpler, still fast, and doesn’t require that you do all that manual 
batching-up, or worry about internal SQLite buffer sizes.

> Also, read about sql bind feature, but not very sure how to do in Golang?

There are a bunch of SQLite wrappers for Go:

   http://go-lang.cat-v.org/library-bindings

Which one are you using?

The first one on that list appears to be MIA, but the second one includes this 
module, which includes a Bind() function:

   https://github.com/kuroneko/gosqlite3/blob/master/query_parameter.go

Seems straightforward to me.

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to