Re: [sqlite] [EXTERNAL] Save text file content in db: lines or whole file?

2018-08-06 Thread Rowan Worth
On 6 August 2018 at 22:20, R Smith wrote: > Think of paragraphs in English as large records delimited by 2 or more > Line-break characters (#10+#13 or perhaps only #10 if on a *nix platform) > between texts. > > Each paragraph record could be comprised of one or more sentences (in > English) as

Re: [sqlite] vtab stat*

2018-08-06 Thread Richard Hipp
On 8/6/18, Giorgi Guliashvili wrote: > I'm wondering if > SQLITE_ENABLE_STAT4 works for vtabs and what are the other options I have. No. STAT4 provides information about indexes. But virtual table have no indexes - at least not indexes visible to the rest of the system. (A specific virtual

[sqlite] vtab stat*

2018-08-06 Thread Giorgi Guliashvili
Hi folks, I'm using only Eponymous virtual tables, however, so far, the only hint I give to the query planner was through some heuristic computing xBestIndex->estimatedCost. Now I'm considering other automatic, updating weights. I'm wondering if SQLITE_ENABLE_STAT4 works for vtabs and what are

Re: [sqlite] Exception at changing a row in .NET FW 4.7.1

2018-08-06 Thread Joe Mistachkin
Rtm Rbtsk wrote: > > If I change the data in the first row with the 'id'='1' in the table > 'leslie', I get a DBConcurrencyException at the Update-command: > > System.Data.DBConcurrencyException: 'Concurrency violation: the > UpdateCommand affected 0 of the expected 1 records.' > It's hard to

Re: [sqlite] Different behavior of .NET client 1.0.108.0SQLiteDataAdapter / DataReader on literal int values in select list.

2018-08-06 Thread Joe Mistachkin
mi...@willyschwabe.de wrote: > > i found out, that the following select statement produces different > schemata in DataTable when using SQLiteDataAdapter.Fill and data > rows are returned or not returned from the SELECT statement. > > SELECT 1 AS literal FROM anTable WHERE 1<1 > Since no rows

[sqlite] Exception at changing a row in .NET FW 4.7.1

2018-08-06 Thread Rtm Rbtsk
Hy, If I change the data in the first row with the 'id'='1' in the table 'leslie', I get a DBConcurrencyException at the Update-command: System.Data.DBConcurrencyException: 'Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.' By deleting the row it raises in

[sqlite] Exception at changing a row

2018-08-06 Thread Rtm Rbtsk
Hy, If I change the data in the first row with the 'id'='1' in the table 'leslie', I get a DBConcurrencyException at the Update-command: System.Data.DBConcurrencyException: 'Concurrency violation: the UpdateCommand affected 0 of the expected 1 records.' By deleting the row it raises in

[sqlite] Different behavior of .NET client 1.0.108.0 SQLiteDataAdapter / DataReader on literal int values in select list.

2018-08-06 Thread micha
Hello everyone, i found out, that the following select statement produces different schemata in DataTable when using SQLiteDataAdapter.Fill and data rows are returned or not returned from the SELECT statement. SELECT 1 AS literal FROM anTable WHERE 1<1 Especially i need those literals in UNION

Re: [sqlite] Save text file content in db: lines or whole file?

2018-08-06 Thread Abramo Bagnara
Il 04/08/2018 07:07, Abramo Bagnara ha scritto: > Il 03/08/2018 23:53, Abroży Nieprzełoży ha scritto: >> -- One table with whole files >> CREATE TABLE content( >> id INTEGER PRIMARY KEY, >> data BLOB NOT NULL >> ); >> -- And second table with line boundaries >> CREATE TABLE lines(

[sqlite] Suggestions: '.mode insert table' output to be within transaction, and REPLACE equivalent

2018-08-06 Thread Tony Papadimitriou
A couple of suggestions (I don’t know if they have come up before): 1. I often update the same table (e.g., a phone directory table) in various independent databases and it’s simpler to cascade the changes by doing this: sql a.db “.mode insert table” “select * from table” | sql b.db than with

Re: [sqlite] Using CTE with date comparison

2018-08-06 Thread David Raymond
The whole fencepost thing is probably doing weird things. Here's my take on it. This is "time to get from A to B". If you want "Total timespan from A to B inclusive" then just add 1 day. Trying to do the +1 day or -1 day in the middle for the fencepost thing is probably what's causing the error

[sqlite] Ajqvue Version 2.0 Released

2018-08-06 Thread dmp
The Ajqvue project is pleased to release v2.0 to the public. The release is a major maintenance, cleanup, and consolidation of the code base. In part most of the work was driven by a DB_to_FileMemoryDB plugin and insuring a more robust handling of SQLite affinity. The sqlite-jdbc library has again

Re: [sqlite] Default Values Pragma bug

2018-08-06 Thread E.Pasma
Hello Ryan, Your already moderate complaint needs further moderation After reading https://www.sqlite.org/lang_createtable.html#dfltval I see that the default value may be a function name (when written inside parenthesis) or a special

Re: [sqlite] [EXTERNAL] Save text file content in db: lines or whole file?

2018-08-06 Thread R Smith
On 2018/08/06 4:49 PM, Hick Gunter wrote: Good luck with quoted speech that contains more than one sentence. E.g. William Faulkner said, “Never be afraid to raise your voice for honesty and truth and compassion against injustice and lying and greed. If people all over the world...would do

Re: [sqlite] Using CTE with date comparison

2018-08-06 Thread Csányi Pál
On Sun, Aug 05, 2018 at 01:12:17PM -0600, Keith Medcalf wrote: > > >Some where in the WITH clause above I want to put '+1 day' in the > >command out there. > > That is because the query does not count the StartDate but does count the > EndDate, so if your EndDate is the next day from the

Re: [sqlite] [EXTERNAL] Save text file content in db: lines or whole file?

2018-08-06 Thread Hick Gunter
Good luck with quoted speech that contains more than one sentence. E.g. William Faulkner said, “Never be afraid to raise your voice for honesty and truth and compassion against injustice and lying and greed. If people all over the world...would do this, it would change the earth.”

Re: [sqlite] [EXTERNAL] Save text file content in db: lines or whole file?

2018-08-06 Thread R Smith
On 2018/08/06 12:00 PM, R Smith wrote: I need to save text files (let say between 1 KB to 20 MB) in a SQLite DB. Why not do both? If it was me, I would write some code to split the text into sentences (not lines - which is rather easy in English, but might be harder in some other

Re: [sqlite] [EXTERNAL] Save text file content in db: lines or whole file?

2018-08-06 Thread R Smith
I need to save text files (let say between 1 KB to 20 MB) in a SQLite DB. I see two possibilities: 1) save all the content in a single column: create table content(id integer not null primary key, text blob not null); 2) split the content in lines: create table