Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-18 Thread Jean-Luc Hainaut
True, "some" parts of "some" games can be implemented with DB technology, particularly matrix- and graph-based ones. Not only for fast storage and retrieval of game data, but, more interestingly, for implementing complex computation algorithms through SQL queries, that may prove faster than t

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-18 Thread R Smith
To add some thoughts to Peter's discussion... In game design speed is definitely of the utmost importance since a visual game is basically a UI that is time-sensitive (unlike nearly any other type of software). It's usual to implement some slow data mechanism, typically an internet service DB

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Shane Dev
> Any practical realtime video game using SQLite is probably > doing so only to save and restore the game board between games. and perhaps calculating the initial "maze" or other non time sensitive data processing > Even a cursory look into production > quality video game development will tell

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread petern
FYI. 2D/3D game usability is extremely sensitive to response time. A stock in-memory SQLite database with plenty of memory is still too slow for tracking the state of an interactive graphical game especially on portable grade cpus. Any practical realtime video game using SQLite is probably doing

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Shane Dev
In my day job, I am an SAP consultant - for over 20 years. Production quality code? Yes, but only within the companies where I have worked - tax, banking, inventory, procurement, sales, etc. My interest in SQLite is a personal hobby project at the moment. I have a couple of ideas for end user appl

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Richard Hipp
On 1/17/18, petern wrote: > > Richard, since you're responding to questions, let me ask again about 3.22 > INTROPECTION_PRAGMAS release. No. We are past pencils-down. No new features at this point. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread petern
csv.c isn't a writer. Shane expected to write the file by inserting rows into the vtable. He has no application whatsoever but for the shell. Richard, since you're responding to questions, let me ask again about 3.22 INTROPECTION_PRAGMAS release. Will function_list() be progressing at all toward

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Richard Hipp
On 1/17/18, petern wrote: > Take a look at the function shell_callback for hints. If the goal is to create a TSV reader/writer, it seems like the CVS reader/writer might be a better starting point, as it is unencumbered by lots of other unrelated features as is the shell. You might be able to ge

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread petern
Take a look at the function shell_callback for hints. See the MODE_Csv case. You could start by cribbing the functions MODE_Csv uses for your own row handler and then see what you'll have to figure out yourself. Typically, if you are a serious product developer at a frontier in the market, you wil

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Peter Da Silva
On 1/17/18, 11:07 AM, "sqlite-users on behalf of Jens Alfke" wrote: > If I were tackling this, I’d look for an open-source CSV parser/generator > library. Once you have that, the part that reads/writes the rows to the > database is pretty simple. If they’re reading tab separated files, I woul

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Jens Alfke
> On Jan 17, 2018, at 3:53 AM, Bart Smissaert wrote: > > You don't have to, just need a different wheel. If I were tackling this, I’d look for an open-source CSV parser/generator library. Once you have that, the part that reads/writes the rows to the database is pretty simple. —Jens ___

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Bart Smissaert
> I try very hard not to reinvent the wheel You don't have to, just need a different wheel. I did this recently both for .csv and also for .html and working very nicely and far more flexible than using the code in shell.c. RBS On Wed, Jan 17, 2018 at 10:54 AM, Shane Dev wrote: > On 17 January

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-17 Thread Shane Dev
On 17 January 2018 at 08:45, petern wrote: > Shane. Expect to do a lot of hacking on shell.c. It's not intended as a > library but as the main program of a console application. That's a shame. I try very hard not to reinvent the wheel especially when the wheel question (shell.c) is widely used

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread petern
Shane. Expect to do a lot of hacking on shell.c. It's not intended as a library but as the main program of a console application. Another way involves controlling the IO handles of your process and sending strings but that will probably run into portability problems that are even a bigger headach

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread Shane Dev
Apparently the CSV virtual table supports neither changes (INSERT, UPDATE, DELETE), nor reading single column csv files. What I really want is the functionality of .import and .output SQLite shell commands. Maybe a better strategy would be to compile shell.c with my c program and call the function

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread Richard Hipp
On 1/16/18, Shane Dev wrote: > I tried - > > sqlite> CREATE VIRTUAL TABLE temp.t1 USING csv(filename='test.tsv'); > > where test.tsv is a tab separated table. However > > select count(*) from t1; > > goes into an infinite loop. Do you how to specify a separator other than > ","? The "C" in CSV st

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread Shane Dev
Thanks Peter, That saved me hours of work. According to the comments - /* Read a single field of CSV text. Compatible with rfc4180 and extended ** with the option of having a separator other than ",". I tried - sqlite> CREATE VIRTUAL TABLE temp.t1 USING csv(filename='test.tsv'); where test.t

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread Peter Da Silva
On 1/16/18, 10:29 AM, "sqlite-users on behalf of petern" wrote: > https://sqlite.org/csv.html BTW typo on that page: “The example above showed a single filename='th3file.csv' argument for the CSV virtual table.” Should be: “The example above showed a single filename='thefile.csv' argumen

Re: [sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread petern
FYI. csv.c is already a separate C program which imports CSV files without necessity of the SQLite shell: https://sqlite.org/csv.html On Tue, Jan 16, 2018 at 12:47 AM, Shane Dev wrote: > Hi, > > I am looking for an efficient way to write a c program which performs the > same function as the SQL

[sqlite] c program which performs the same function as the SQLite shell command ".import"

2018-01-16 Thread Shane Dev
Hi, I am looking for an efficient way to write a c program which performs the same function as the SQLite shell command ".import" My initial strategy is to include the sqlite library source files and copy the control block from shell.c that begins after if( c=='i' && strncmp(azArg[0], "import",

Re: [sqlite] C++ compiler

2018-01-02 Thread Igor Korot
s depending on the compiler > you use. > > Cheers > > -- > Adolfo J. Millan > >> >> Mensaje original >> De: eli >> Para: sqlite-users@mailinglists.sqlite.org >> Fecha: Sat, 30 Dec 2017 13:35:35 +0200 >> Asunto: [sqlite] C++ compile

Re: [sqlite] C++ compiler

2018-01-02 Thread ajm
sqlite-users@mailinglists.sqlite.org > Fecha: Sat, 30 Dec 2017 13:35:35 +0200 > Asunto: [sqlite] C++ compiler > > Hello, It would be awesome if SQLite could compile as a part of bigger C++ project. Right now there is a bunch of pointer casting errors, that can be fixed in a matt

Re: [sqlite] C++ compiler

2018-01-02 Thread Deon Brewis
users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Nelson, Erik - 2 Sent: Tuesday, January 2, 2018 9:50 AM To: SQLite mailing list Subject: Re: [sqlite] C++ compiler Eli Sent: Saturday, December 30, 2017 6:36 AM >It would be awesome if SQLite could compile as a part of bigger C++

Re: [sqlite] C++ compiler

2018-01-02 Thread Simon Slavin
On 30 Dec 2017, at 11:35am, eli wrote: > It would be awesome if SQLite could compile as a part of bigger C++ project. It can. It should work fine. This is the main way SQLite is intended to be used. Download the "amalgamation" source code (one .h and one .c file) and include them in your

Re: [sqlite] C++ compiler

2018-01-02 Thread Igor Korot
Hi, On Sat, Dec 30, 2017 at 5:35 AM, eli wrote: > Hello, > > It would be awesome if SQLite could compile as a part of bigger C++ project. > Right now there is a bunch of pointer casting errors, that can be fixed in > a matter of hour IMHO. Which OS/compiler are you trying? What is the exact erro

Re: [sqlite] C++ compiler

2018-01-02 Thread Nelson, Erik - 2
Eli Sent: Saturday, December 30, 2017 6:36 AM >It would be awesome if SQLite could compile as a part of bigger C++ project. >Right now there is a bunch of pointer casting errors, that can be fixed in >a matter of hour IMHO. I don't have any trouble using it as part of a larger C++ project. -

Re: [sqlite] C++ compiler

2018-01-02 Thread John McKown
On Sat, Dec 30, 2017 at 5:35 AM, eli wrote: > Hello, > > It would be awesome if SQLite could compile as a part of bigger C++ > project. > Right now there is a bunch of pointer casting errors, that can be fixed in > a matter of hour IMHO. > ​I'm not a very knowledgeable C++ programmer, but wouldn

[sqlite] C++ compiler

2018-01-02 Thread eli
Hello, It would be awesome if SQLite could compile as a part of bigger C++ project. Right now there is a bunch of pointer casting errors, that can be fixed in a matter of hour IMHO. Cheers, ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.

Re: [sqlite] C# pragma integrity_check call throwing exception

2017-10-26 Thread Roberts, Barry (FINTL)
Simon, > Your text makes it look like you think that that kind of corruption affects > only existing rows. This is not the case. If you continue to write to a > database which shows this problem, you can lose more of the existing rows > and/or the new data you're trying to write. The proper

Re: [sqlite] C# pragma integrity_check call throwing exception

2017-10-24 Thread Keith Medcalf
--Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Roberts, Barry (FINTL) >Sent: Tuesday, 24 October, 2017 09:04 >To: sqlite-users@mailinglists.sqlite.org >Subject: [sqlite] C# pragma integrity_check call throwing exceptio

Re: [sqlite] C# pragma integrity_check call throwing exception

2017-10-24 Thread Simon Slavin
On 24 Oct 2017, at 4:03pm, Roberts, Barry (FINTL) wrote: > Our system would get a list of the rowid problems allowing it to log them and > inform the user. I am currently testing using the 1.0.105.1 driver, however > the ExecuteReader() call (above) throws an exception saying the database is

[sqlite] C# pragma integrity_check call throwing exception

2017-10-24 Thread Roberts, Barry (FINTL)
Hi, I asked the following question a few weeks ago, but did not get any responses, hoping someone may have an idea. We are currently running System.Data.SQLite.dll 1.0.80.0 and would like to upgrade to a newer version. However there are a variety of issues we have run into, most of which I hav

Re: [sqlite] C++ sqlite_version()

2017-08-28 Thread Jens Alfke
> On Aug 25, 2017, at 7:56 PM, Papa wrote: > > const std::string& SQLite3_RDB::getSQLiteVersion(){ > tmp = sqlite_version(); > } sqlite_version() is not a function in SQLite itself; is it from some wrapper library you're using? Most likely the crash is in that function. Look at the crash

Re: [sqlite] C++ sqlite_version()

2017-08-25 Thread Keith Medcalf
Of Papa >Sent: Friday, 25 August, 2017 20:56 >To: SQLite mailing list >Subject: [sqlite] C++ sqlite_version() > >In my C++ program, I'd like to display the SQLite3 version. To do so, >this is what I have done. > >class SQLite3_RDB { >     private: >     sqli

Re: [sqlite] C++ sqlite_version()

2017-08-25 Thread Keith Medcalf
sqlite.org] On Behalf Of Papa >Sent: Friday, 25 August, 2017 20:56 >To: SQLite mailing list >Subject: [sqlite] C++ sqlite_version() > >In my C++ program, I'd like to display the SQLite3 version. To do so, >this is what I have done. > >class SQLite3_RDB { >     priv

[sqlite] C++ sqlite_version()

2017-08-25 Thread Papa
In my C++ program, I'd like to display the SQLite3 version. To do so, this is what I have done. class SQLite3_RDB {     private:     sqlite3* db; //!< Data Base         std::string tmp;    public:     SQLite3_RDB(){}     ~SQLite3_RDB(){sqlite3_close(db); }     const std::string&

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread Jens Alfke
> On May 25, 2017, at 10:00 PM, Wout Mertens wrote: > > I would like to make it partially asynchronous, still doing most of the > work on the main thread, but waiting in a helper thread. I was thinking > that the longest delays will be from disk access, so sqlite_step(). SQLite has a cache, so

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread Richard Hipp
On 5/26/17, Wout Mertens wrote: > > Are the above assumptions correct? Any other calls (besides opening the db) > that can take a long time? Most of the work associated with opening the database connection (which is to say, parsing the schema) is deferred until the first time you call sqlite3_pre

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread R Smith
On 2017/05/26 7:33 AM, Simon Slavin wrote: On 26 May 2017, at 6:00am, Wout Mertens wrote: Ideally there'd be some way to know if a _step() call will be served from buffer… There are (simplified) three possibilities: quick quick, slow slow, and slow quick. A) SQLite finds a good index for t

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-26 Thread Wout Mertens
On Fri, May 26, 2017 at 7:33 AM Simon Slavin wrote: > > On 26 May 2017, at 6:00am, Wout Mertens wrote: > > > Ideally there'd be some way to know if a _step() call will be served from > > buffer… > > There are (simplified) three possibilities: quick quick, slow slow, and > slow quick. > [...] Aha

Re: [sqlite] C API: which calls have the biggest chance of latency?

2017-05-25 Thread Simon Slavin
On 26 May 2017, at 6:00am, Wout Mertens wrote: > Ideally there'd be some way to know if a _step() call will be served from > buffer… There are (simplified) three possibilities: quick quick, slow slow, and slow quick. A) SQLite finds a good index for the search/sort and can easily locate all t

[sqlite] C API: which calls have the biggest chance of latency?

2017-05-25 Thread Wout Mertens
I am liking the simplicity of the better-sqlite3 Nodejs library, but it is synchronous (for some good reasons), so it will hang the main thread until sqlite is done. I would like to make it partially asynchronous, still doing most of the work on the main thread, but waiting in a helper thread. I w

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-18 Thread James K. Lowden
On Tue, 9 Aug 2016 17:09:39 -0300 Paulo Roberto wrote: > I would like something like this: > > "BEGIN EXCLUSIVE TRANSACTION;" > "SELECT counter FROM mytable WHERE counterid = ?;" > "UPDATE mytable SET counter=? WHERE counterid = ?;" > "COMMIT TRANSACTION;" begin transaction;

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-11 Thread Dominique Devienne
On Thu, Aug 11, 2016 at 4:34 AM, Paulo Roberto wrote: > Thank you very much, it worked! Just remember that exposing a SQL function that de-references a "user"-supplied integer value as a pointer is inherently unsafe. Anyone can select remember(val, 0) or select remember(val, 101) and crash (at

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-10 Thread Paulo Roberto
Thank you very much, it worked! On Tue, Aug 9, 2016 at 11:49 PM, Richard Hipp wrote: > On 8/9/16, Paulo Roberto wrote: > > > > I found your solution pretty elegant and I tried to implement it. > > But after solving a lot of building issues with the sqlite3ext header > > It does not have to be i

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Paulo Roberto wrote: > > I found your solution pretty elegant and I tried to implement it. > But after solving a lot of building issues with the sqlite3ext header It does not have to be implemented as a loadable extension. Just copy the lines https://www.sqlite.org/src/artifact/8440f8

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Paulo Roberto
Thank you for all the answers. Clemens, The counterid in my case is a text field and not an integer. That's why I need to sanitize. Clemens and Keith, As each of my process has its own connection to the database, I tried your solution using BEGIN IMMEDIATE and it worked successfully. Thank you.

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Keith Medcalf
> "BEGIN EXCLUSIVE TRANSACTION;" > "SELECT counter FROM mytable WHERE counterid = ?;" > "UPDATE mytable SET counter=? WHERE counterid = ?;" > "COMMIT TRANSACTION;" > I have a counter that I need to increment and get its previous value in one > operation. > To access this counter I must pass a

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Richard Hipp wrote: > Or, you could make remember() a two argument function: > >UPDATE mytable SET counter=remember(counter, $ptr)+1 WHERE counterid=$id > A sample implementation for this function can now been seen at https://www.sqlite.org/src/artifact/8440f8d0b452c5cd -- D. Ric

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Richard Hipp wrote: > > UPDATE mytable SET counter=remember(counter)+1 WHERE counterid=? > Or, you could make remember() a two argument function: UPDATE mytable SET counter=remember(counter, $ptr)+1 WHERE counterid=$id Then bind $ptr to the address of the variable in which you wan

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Paulo Roberto wrote: > > I need some help to ... increment a counter and get its > former value. > My question is: Preparing 4 statements, binding then and calling > *sqlite3_step > *for each one of then in order, would have the expected atomic operation > behavior or not? If not, how

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Simon Slavin
On 9 Aug 2016, at 9:09pm, Paulo Roberto wrote: > My question is: Preparing 4 statements, binding then and calling *sqlite3_step > *for each one of then in order, would have the expected atomic operation > behavior or not? You might be happier with BEGIN IMMEDIATE. No other connections can make

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Clemens Ladisch
Paulo Roberto wrote: > I need some help to do a simple operation, increment a counter and get its > former value. > I could have some race condition, so the transaction must be atomic. > > I also would like to use prepared statements to accomplish that, so I have > less effort sanitizing inputs. I

[sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Paulo Roberto
Hello, I need some help to do a simple operation, increment a counter and get its former value. I could have some race condition, so the transaction must be atomic. I also would like to use prepared statements to accomplish that, so I have less effort sanitizing inputs. My problem: I have a cou

[sqlite] C API reference manpages

2016-04-19 Thread Kristaps Dzonsons
> On Thu, 31 Mar 2016 10:21:53 -0400 > Richard Hipp wrote: > >> On 3/31/16, Kristaps Dzonsons wrote: >>> >>> Is there any interest in integrating this tool to have manpages in >>> the doc distribution without downstream bits? >>> >> >> I think that would be cool. Integrating your tool into the

[sqlite] C API reference manpages

2016-04-04 Thread Kristaps Dzonsons
> How about the CC0 license? I think it's designed for these sorts of > things (you want to make something public domain even if you're not > allowed to) - https://creativecommons.org/about/cc0/ Jonathon, I think the problem is that LV is similar to Norway[1] in this regard, so something like CC0

[sqlite] C API reference manpages

2016-04-04 Thread Jonathan Moules
How about the CC0 license? I think it's designed for these sorts of things (you want to make something public domain even if you're not allowed to) - https://creativecommons.org/about/cc0/ On Fri, 01 Apr 2016 00:05:30 +0100 Kristaps Dzonsons wrote >> As for publ

[sqlite] C API reference manpages

2016-04-03 Thread James K. Lowden
On Thu, 31 Mar 2016 10:21:53 -0400 Richard Hipp wrote: > On 3/31/16, Kristaps Dzonsons wrote: > > > > Is there any interest in integrating this tool to have manpages in > > the doc distribution without downstream bits? > > > > I think that would be cool. Integrating your tool into the source >

[sqlite] C API reference manpages

2016-04-01 Thread Kristaps Dzonsons
>> As for public domain, I'm happy to put the sources under a similar >> license. I can't speak for the voodoo of the public domain and the EU >> (or is it country-by-country?), however. > > From an English translation I found of the Latvian law includes moral > rights and is closer to the droit

[sqlite] C API reference manpages

2016-03-31 Thread Matthias-Christian Ott
On 31/03/16 14:39, Kristaps Dzonsons wrote: >>> Is there any interest in integrating this tool to have manpages in the >>> doc distribution without downstream bits? >> >> I think that would be cool. Integrating your tool into the source >> tree would mean that as the comment formats evolve, your t

[sqlite] C API reference manpages

2016-03-31 Thread Kristaps Dzonsons
>> Is there any interest in integrating this tool to have manpages in the >> doc distribution without downstream bits? > > I think that would be cool. Integrating your tool into the source > tree would mean that as the comment formats evolve, your tool would > evolve in lock-step. If your tool i

[sqlite] C API reference manpages

2016-03-31 Thread Kristaps Dzonsons
Hello, I couldn't find any way to convert the SQLite docs (via sqlite.h) to UNIX manpages, so I wrote a tool that does so: https://github.com/kristapsdz/sqlite2mdoc This generates one manpage per API reference with the proper SEE ALSO (from collected references) and IMPLEMENTATION NOTES (the ra

[sqlite] C API reference manpages

2016-03-31 Thread Richard Hipp
On 3/31/16, Kristaps Dzonsons wrote: > > Is there any interest in integrating this tool to have manpages in the > doc distribution without downstream bits? > I think that would be cool. Integrating your tool into the source tree would mean that as the comment formats evolve, your tool would evol

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread R Smith
That's not an SQLitespeed feature but indeed a backwards-compatible SQLite feature. (I had this wrong too at some point) You probably already know, but to be clear: In SQL standard, double-quotes indicate identifiers and single quotes indicate string values. While the single quotes are used more

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
-Original Message- > From: sqlite-users-bounces at mailinglists.sqlite.org > [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Chris > Prakoso > Sent: Tuesday, February 9, 2016 7:56 AM > To: SQLite mailing list > Subject: Re: [sqlite] C# + SQLite - Update/In

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Thanks for the detailed explanation. Regards, Chris On Tue, Feb 9, 2016 at 4:05 PM, R Smith wrote: > That's not an SQLitespeed feature but indeed a backwards-compatible SQLite > feature. (I had this wrong too at some point) > > You probably already know, but to be clear: In SQL standard, double

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Salih Yücel
users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Chris Prakoso Sent: Tuesday, February 9, 2016 5:09 PM To: SQLite mailing list Subject: Re: [sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates? Yes thank you. My SQLite i

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > insert into test (field1,field2) values (1,"two"),(2,"three") > > SQL Error: near ",": syntax error You might want to update to a tool that is not years out of date. Regards, Clemens

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Ok. Thanks for the reminder. Regards, Chris On Tue, Feb 9, 2016 at 3:18 PM, Richard Hipp wrote: > On 2/9/16, Chris Prakoso wrote: > > Actually I've just done it now, in SQLiteSpeed, and it allowed me to use > > double-quote as delimiter successfully. > > > > That is supported for backwards com

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Actually I've just done it now, in SQLiteSpeed, and it allowed me to use double-quote as delimiter successfully. Regards, Chris On Tue, Feb 9, 2016 at 3:03 PM, Simon Slavin wrote: > > On 9 Feb 2016, at 12:10pm, Chris Prakoso wrote: > > > *insert into test (field1,field2) values (1,"two"),(2,"t

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Yes thank you. My SQLite is the latest, it's the front-end that is outdated, which I have just swiftly corrected. Regards, Chris On Tue, Feb 9, 2016 at 2:52 PM, Richard Hipp wrote: > On 2/9/16, Clemens Ladisch wrote: > > Chris Prakoso wrote: > >> insert into test (field1,field2) values (1,"tw

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Simon Slavin
On 9 Feb 2016, at 12:10pm, Chris Prakoso wrote: > *insert into test (field1,field2) values (1,"two"),(2,"three")* As well as the comments about your software being out of date, you need to know that the text delimiter in SQLite is the non-directional single quote character normally seen as an

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread R Smith
On 2016/02/09 1:30 PM, Chris Prakoso wrote: > Hi Clemens, > > Thanks for your reply. I've tried to use raw SQL but it didn't work > either. Do you have any SQLite front-end that you use? If I may suggest, try SQLitespeed (http://sqlc.rifin.co.za/) and add your DB file, open it and then use th

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Steven, I don't use any back-end, the code I pasted here IS my back-end. I opted for direct SQLite connection. So I don't use EF6 nor Linq. Chris On Tue, Feb 9, 2016 at 1:47 PM, Steven M. McNeese < steven.mcneese at freedomparkdfw.com> wrote: > Chris, > > What are you using in c# for SQLite b

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Thanks Ryan, I will definitely try it. I'm ok with raw SQL, just not familiar with the odd ones like this multiple rows update. Thanks a lot, Chris On Tue, Feb 9, 2016 at 12:42 PM, R Smith wrote: > > > On 2016/02/09 1:30 PM, Chris Prakoso wrote: > >> Hi Clemens, >> >> Thanks for your reply.

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > public bool UpdateData(string tableName, Dictionary > fields, List whereKeys) > { > ... > using (SQLiteTransaction transaction = > conn.BeginTransaction()) > { > ... >

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Ok. Got it. Now, if only I can get that multiple rows update working on my code, it would be perfect. Thanks a lot, Chris On Tue, Feb 9, 2016 at 12:07 PM, Clemens Ladisch wrote: > Chris Prakoso wrote: > > public bool UpdateData(string tableName, > Dictionary fields, List whereKeys) > >

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > I've been testing the performance of my Insert/Update using > Transaction and without, and I found that it is quicker when I don't > use it. Show the code. Regards, Clemens

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > My question is whether anybody had successfully implemented multiple > rows Insert/Update. This is possible in SQL: INSERT INTO MyTable(ID, Value) VALUES (1, 'hello'), (2, 'world'); UPDATE MyTable SET Value = 'the same value' WHERE ID IN (1, 2); -- rather verbose;

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
I did a test using simple table, and entering the sql directly using SQLite Administrator: *insert into test (field1,field2) values (1,"two"),(2,"three")* The error I got from the SQLite Administrator is: *2/9/2016 11:29:40 AM: SQL Error: near ",": syntax error * Thanks, Chris On Tue, Feb 9

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Here they are: public bool UpdateData(string tableName, Dictionary fields, List whereKeys) { bool result = false; string sql = ""; List fieldList = new List(); List whereKeyList = new List(); int rowsUpdated = 0;

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Hi Clemens, Thanks for your reply. I've tried to use raw SQL but it didn't work either. Do you have any SQLite front-end that you use? Regards, Chris On Tue, Feb 9, 2016 at 11:12 AM, Clemens Ladisch wrote: > Chris Prakoso wrote: >> My question is whether anybody had successfully implemented

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Hi all, I've been testing the performance of my Insert/Update using Transaction and without, and I found that it is quicker when I don't use it. Anybody has an insight on this? Thanks a lot, Chris

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Hi all, I just joined the Mailing List yesterday, so apologise for any mistake I am doing. I'm a .NET (C#) Developer, and at the moment I'm coding a small app with SQLite as the backend database. My question is whether anybody had successfully implemented multiple rows Insert/Update. I've tried

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Richard Hipp
On 2/9/16, Chris Prakoso wrote: > Actually I've just done it now, in SQLiteSpeed, and it allowed me to use > double-quote as delimiter successfully. > That is supported for backwards compatibility. I originally put in support for double-quoted string literals to be compatible with MySQL 3.5. I

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Steven M. McNeese
: Tuesday, February 9, 2016 7:56 AM To: SQLite mailing list Subject: Re: [sqlite] C# + SQLite - Update/Insert using Transaction is slower than without. Steven, I don't use any back-end, the code I pasted here IS my back-end. I opted for direct SQLite connection. So I don't use EF6 nor Linq.

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Richard Hipp
On 2/9/16, Clemens Ladisch wrote: > Chris Prakoso wrote: >> insert into test (field1,field2) values (1,"two"),(2,"three") >> >> SQL Error: near ",": syntax error > > You might want to update to a tool that is not years out of date. > What Clemens means by this is that prior to SQLite 3.7.11 (2012

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Steven M. McNeese
Chris, What are you using in c# for SQLite back end? Ado.net? Linq. Let me know and I can help you with bulk inserts. Sent from my iPhone > On Feb 9, 2016, at 6:13 AM, Chris Prakoso wrote: > > Ok. Got it. > Now, if only I can get that multiple rows update working on my code, it > would be

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Richard Hipp
On 2/9/16, Chris Prakoso wrote: > Hi Clemens, > > Thanks for your reply. I've tried to use raw SQL but it didn't work > either. Please show us the SQL that you did you. > Do you have any SQLite front-end that you use? > The only supported "front-end" (if I correctly understand your meaning) is

[sqlite] C# Microsoft.data.sqlite SqliteCommand::ExecuteReader encounters a doubly freed pointer after 935 invocations

2015-11-14 Thread Frank Chang
We encountered a doubly freed "C" pointer after calling sqlite3_exec in my custom version of the Microsoft.Data.Sqlite C# method SqliteCommand::ExecuteAnReader which does not call the parent C# class method DbCommand::ExecuteReader which does not use a C# NativeMethod. The C# NativeMethod clas

[sqlite] SQLite C# Windows Store Apps

2015-10-22 Thread Martin Křížek
Hi, can any one write some suggestion (I mean nuget package(s)) for creating Windows Store App in C# with SQLite? In desktop apps I use simply "System.Data.SQLite (x86/x64)" which I love because it allows me to write SQL statements directly. Are there any good (ideally with examples or documentatio

[sqlite] what is typical pattern for test double of sqlite c api

2015-08-11 Thread Adam Devita
Good day, I'm about to implement TDD for an existing c project that uses sqlite, using CPPUnit. Sqlite would be a dependency from the point of view of the routines making calls to it. Is is typical to just write a link time stub to substitute commonly used parts of the interface (exec, open, pre

[sqlite] C++ ORM

2015-03-12 Thread Alejandro Santos
On Mon, Mar 9, 2015 at 10:38 PM, Scott Robison wrote: > A co-worker who is working on a project is interested in finding out if > there is an effective ORM for C++ / SQLite. I've not used one so I'm > turning to the list to see if anyone has a recommendation. > > Note: He's okay using SQLite more

[sqlite] C++ ORM

2015-03-11 Thread Darren Spruell
On Mon, Mar 9, 2015 at 3:25 PM, Simon Slavin wrote: > > On 9 Mar 2015, at 9:38pm, Scott Robison wrote: > >> A co-worker who is working on a project is interested in finding out if >> there is an effective ORM for C++ / SQLite. I've not used one so I'm >> turning to the list to see if anyone has a

[sqlite] C++ ORM

2015-03-10 Thread Boris Kolpackov
Hi Scott, Scott Robison writes: > A co-worker who is working on a project is interested in finding out if > there is an effective ORM for C++ / SQLite. I've not used one so I'm > turning to the list to see if anyone has a recommendation. Check out ODB: http://codesynthesis.com/products/odb/ Qu

[sqlite] C++ ORM

2015-03-10 Thread QxOrm contact
Hello, I'm the main developer of QxOrm library and QxEntityEditor application : http://www.qxorm.com/ Quickly : QxOrm library provides ORM feature to C++/Qt developers, and QxEntityEditor provides a graphic way to design and manage the data model. FYI, QxOrm provides also a set of other features

[sqlite] C++ ORM

2015-03-09 Thread Simon Slavin
On 9 Mar 2015, at 9:38pm, Scott Robison wrote: > A co-worker who is working on a project is interested in finding out if > there is an effective ORM for C++ / SQLite. I've not used one so I'm > turning to the list to see if anyone has a recommendation. For those playing along at home, ORM == Ob

[sqlite] C++ ORM

2015-03-09 Thread Darren Duncan
On 2015-03-09 3:25 PM, Simon Slavin wrote: > On 9 Mar 2015, at 9:38pm, Scott Robison wrote: > >> A co-worker who is working on a project is interested in finding out if >> there is an effective ORM for C++ / SQLite. I've not used one so I'm >> turning to the list to see if anyone has a recommendat

[sqlite] C++ ORM

2015-03-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/09/2015 02:38 PM, Scott Robison wrote: > Note: He's okay using SQLite more or less directly if he needs to, > as he recognizes the lack of reflection in C++ might lead to a less > manageable ORM. Still, never hurts to ask. Don't use an ORM unles

[sqlite] C++ ORM

2015-03-09 Thread Scott Robison
A co-worker who is working on a project is interested in finding out if there is an effective ORM for C++ / SQLite. I've not used one so I'm turning to the list to see if anyone has a recommendation. Note: He's okay using SQLite more or less directly if he needs to, as he recognizes the lack of re

  1   2   3   4   5   6   >