Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30/06/13 20:17, Igor Korot wrote: > Well I'm not familiar with SQLite internals, but one thing for sure: > why go thru the process if you can avoid it? You are trying to do premature optimization. Note the "Lite" in the SQLite. It is already

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Tandetnik
On 6/30/2013 11:17 PM, Igor Korot wrote: On Sun, Jun 30, 2013 at 7:47 PM, Igor Tandetnik wrote: On 6/30/2013 10:27 PM, Igor Korot wrote: 1. I'm trying to minimize the number of requests I'm doing to the DB. What I need is a way to count the number of rows that the query

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Simon Slavin
On 1 Jul 2013, at 4:13am, Igor Korot wrote: > Well I will use another statement variable as in the sample code. > My questions was: if I call delete on the record that was just retrieved in > another query will this delete affects it? I can’t say a definite 'yes’ because it

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Tandetnik
On 6/30/2013 11:13 PM, Igor Korot wrote: Well I will use another statement variable as in the sample code. My questions was: if I call delete on the record that was just retrieved in another query will this delete affects it? If you change data that a live SELECT statement is iterating over,

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Korot
On Sun, Jun 30, 2013 at 7:47 PM, Igor Tandetnik wrote: > On 6/30/2013 10:27 PM, Igor Korot wrote: > >> 1. I'm trying to minimize the number of requests I'm doing to the DB. What >> I need is a way to count the number of rows that the query return to me >> prior to going thru

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Korot
Simon, On Sun, Jun 30, 2013 at 7:41 PM, Simon Slavin wrote: > > On 1 Jul 2013, at 3:27am, Igor Korot wrote: > > > 1. I'm trying to minimize the number of requests I'm doing to the DB. > What > > I need is a way to count the number of rows that the

Re: [sqlite] Shell: .IMPORT does not seem to obey .BAIL setting

2013-06-30 Thread Jay A. Kreibich
On Fri, Jun 28, 2013 at 10:56:08PM +0300, to...@acm.org scratched on the wall: > Trying to import data into a table the operation stops on first error > (actually a rollback seems to be performed) because of column number > mismatch. > > Why does it not follow the .BAIL ON/OFF setting? And, why

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Tandetnik
On 6/30/2013 10:27 PM, Igor Korot wrote: 1. I'm trying to minimize the number of requests I'm doing to the DB. What I need is a way to count the number of rows that the query return to me prior to going thru the "sqlite3_step()". If this number is 0, I want to skip the processing and just

Re: [sqlite] Another 2 questions about SQLite

2013-06-30 Thread Simon Slavin
On 1 Jul 2013, at 3:27am, Igor Korot wrote: > 1. I'm trying to minimize the number of requests I'm doing to the DB. What > I need is a way to count the number of rows that the query return to me > prior to going thru the "sqlite3_step()". Sorry, not possible. SQLite does

[sqlite] Another 2 questions about SQLite

2013-06-30 Thread Igor Korot
Hi, ALL, 1. I'm trying to minimize the number of requests I'm doing to the DB. What I need is a way to count the number of rows that the query return to me prior to going thru the "sqlite3_step()". If this number is 0, I want to skip the processing and just return. It's not an error situation, it

Re: [sqlite] sqlite3: .import command handles quotation incorrectly

2013-06-30 Thread gwenn
Hello, I've tested the improved ".import" command and it seems that there is a bug with empty not-quoted field: $ cat empty.csv A|B | $ ./a.out SQLite version 3.8.0 2013-06-28 23:55:45 sqlite> .import empty.csv test empty.csv:2: expected 2 columns but found 1 - filling the rest with NULL sqlite>