Re: [sqlite] csv extension/feature requests: new options for field separator different from default ', ' and skip=N to skip first N lines

2020-02-04 Thread Robert Hairgrove
On 04.02.20 15:42, Simon Slavin wrote: On 4 Feb 2020, at 12:18pm, Robert M. Münch wrote: - sep=';': field separator character (different from default ',') If you provide this facility, please don't add it to anything called 'csv' since the 'c' stands for 'comma'. For those playing along at

Re: [sqlite] Multi layer JSON query

2019-12-20 Thread Robert Hairgrove
On 20.12.19 04:45, No.1 Perfect wrote: I've read the full page instructions of JSON1, But I don't know how to use JSON1 to query multiple layers JSON data. The Data as follows : { id: 1, data: { customer: 1, goods: [ { id: 1, name: "apple", price: 12, num: 10, amount: 120 },

Re: [sqlite] how to delete BLOB object from the data base

2019-07-15 Thread Robert Hairgrove
On 15.07.19 21:38, Zhu, Liang [AUTOSOL/ASSY/US] wrote: ... I am inserting to the BLOB data into the table at every 250ms, I delete the oldest row at every 600ms, also I am reading the data from the database at every 10ms... How do you determine the "oldest" row? I believe the timestamps

Re: [sqlite] the sqlite3 documentation would be pretty good if itwasn't tragic...

2019-06-26 Thread Robert Hairgrove
On 26.06.19 18:58, a...@zator.com wrote: Irreproachable argumentation, which in my humble opinion is little or nothing useful to those who want to enter in the diabolic world of SQL. Especially, if you have not yet managed to change the chip and find out that for example, you must carry out a

Re: [sqlite] Change delimiter with CSV extension?

2019-05-30 Thread Robert Hairgrove
On 30.05.19 15:16, Richard Hipp wrote: On 5/30/19, Tony Papadimitriou wrote: Is it possible to change the delimiter with the CSV virtual table extension? No, not at run-time. You could, of course, edit the source code and recompile, but I assume you are looking for a run-time parameter, and

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-27 Thread Robert Hairgrove
On Tue, 2017-06-27 at 16:38 +0200, Eric Grange wrote: > > > > ASCII / ANSI is a 7-bit format. > ASCII is a 7 bit encoding, but uses 8 bits in just about any > implementation > out there. I do not think there is any 7 bit implementation still > alive > outside of legacy mode for low-level wire

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-27 Thread Robert Hairgrove
On Tue, 2017-06-27 at 12:42 +0200, Eric Grange wrote: > In the real world, text files are heavily skewed towards 8 bit > formats, > meaning just three cases dominate the debate: > - ASCII / ANSI > - utf-8 with BOM > - utf-8 without BOM ASCII / ANSI is a 7-bit format.

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-27 Thread Robert Hairgrove
On Tue, 2017-06-27 at 01:14 -0600, Scott Robison wrote: > The original issue was two of the largest companies in the world > output the > Byte Encoding Mark(TM)(Patent Pending) (or BOM) at the beginning of > UTF-8 > encoded text streams, and it would be friendly for the SQLite3 shell > to > skip

Re: [sqlite] [OT] UTF8-BOM and text encoding detection (was: UTF8-BOM not disregarded in CSV import)

2017-06-27 Thread Robert Hairgrove
On Tue, 2017-06-27 at 01:14 -0600, Scott Robison wrote: > On Jun 27, 2017 12:13 AM, "Rowan Worth" wrote: > > I'm sure I've simplified things with this description - have I missed > something crucial? Is the BOM argument about future proofing? Are we > worried about EBCDIC? Is my

Re: [sqlite] How to circumvent UNIQUE constraint

2017-01-21 Thread Robert Hairgrove
On Sat, 2017-01-21 at 11:54 +0100, Cecil Westerhof wrote: > I have the following (work in progress) table: > CREATE  TABLE desktops( > nameTEXTNOT NULL PRIMARY KEY, > indexNo INTEGER NOT NULL UNIQUE, > value   TEXTNOT NULL UNIQUE, > waitSeconds INTEGER NOT

Re: [sqlite] Performing a SELECT on an enormous database...

2014-10-25 Thread Robert Hairgrove
On Fri, 2014-10-24 at 19:09 -0400, Ross Altman wrote: > I'm currently working with a pretty gigantic database (116 Gb at the > moment, and growing). Performing a simple SELECT routine with one filter > takes between 7 and 15 minutes, which is starting to become a problem. The > command I'm using

Re: [sqlite] comma-separated string data

2014-04-04 Thread Robert Hairgrove
You need to normalize the database design. -- On Fri, 2014-04-04 at 14:20 -0400, peter korinis wrote: > A data column in a link table contains comma-separated string data, where > each value represents a value to link to another table. (many-to-many > relationship) > > > > How do you 'parse'

Re: [sqlite] Bullzip ms Access to MySql

2013-03-06 Thread Robert Hairgrove
On Wed, 2013-03-06 at 21:36 +, ven...@intouchmi.com wrote: > ENGINE=myisam DEFAULT CHARSET=utf8; Try removing the bit in the above quote. This is MySQL-specific code. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Fwd: How to prevent View sqlite database structure and contents from database browsers

2013-02-08 Thread Robert Hairgrove
On Fri, 2013-02-08 at 13:13 +, SR Volatile wrote: > Dear Sir/Madam, > > I am using Sqlite for my project. Currently, Sqlite database browser able > to view / edit sqlite database structure and content. As part of my > project, I don't want anybody to view/edit the database contents from any >

Re: [sqlite] [sqlite-dev] Amalgamation code doesn't supoort limit on update / delete

2011-03-13 Thread Robert Hairgrove
On Sun, 2011-03-13 at 14:53 -0400, Pavel Ivanov wrote: > On Sun, Mar 13, 2011 at 2:46 PM, Steven Hartland > wrote: > > After spending many hours banging my head trying to figure out why > > sqlite-jdbc was erroring on a delete with a limit even when compiled > >

Re: [sqlite] Help with a query

2011-03-04 Thread Robert Hairgrove
On Fri, 2011-03-04 at 11:10 +0100, Marco Bambini wrote: > Hello, > I have a table defined as: > CREATE TABLE MKProperties (id INTEGER PRIMARY KEY AUTOINCREMENT, obj_id > INTEGER, prop_key TEXT, prop_value TEXT, UNIQUE(obj_id, prop_key)) > > In that table there some rows like: > obj_id

Re: [sqlite] adding fdopen to VFS?

2011-02-28 Thread Robert Hairgrove
On Mon, 2011-02-28 at 14:33 -0500, Richard Hipp wrote: > On Mon, Feb 28, 2011 at 1:00 PM, Paweł Hajdan, Jr. [many interesting things snipped ...] > wrote: > > What do you think about adding a call like below to the VFS interface? > > > > int (*xOpenWrapper)(const char

Re: [sqlite] VFS

2011-02-23 Thread Robert Hairgrove
It appears that Qt (or more accurately, WebKit) had defined SQLITE_OMIT_LOAD_EXTENSION and a couple of other symbols at compile time, and therefore when Qt opens a database, it uses a slightly different VFS than the default VFS contained in sqlite3.c (i.e., no xDl* members are set). I believe now

Re: [sqlite] VFS

2011-02-22 Thread Robert Hairgrove
On Tue, 2011-02-22 at 08:46 -0800, Roger Binns wrote: > On 02/22/2011 05:29 AM, Robert Hairgrove wrote: > > I'm trying to understand how the VFS implementation works. > > What you think you are seeing is not happening. The documentation is correct. OK ... but what about tha

[sqlite] VFS

2011-02-22 Thread Robert Hairgrove
I'm trying to understand how the VFS implementation works. If I fetch the default VFS with sqlite3_vfs_find(NULL), these members: xDlOpen xDlError xDlSym xDlClose all have non-NULL values. However, if I open a database and inspect the VFS contained in the sqlite3*, these four members are

Re: [sqlite] update of a blob

2011-02-21 Thread Robert Hairgrove
On Mon, 2011-02-21 at 15:13 +0100, Dietmar Hummel wrote: > std::string strStatement( "UPDATE persistence SET > name=\"blub\",expiration=\"2011-04-02\",value=\"?\" WHERE id=\"1\"" ); In addition to what Igor said, it isn't really proper (standard?) SQL to put double quotes around the value

Re: [sqlite] Implementing custom xRead() and xWrite() routines for sqlite3_vfs

2011-02-20 Thread Robert Hairgrove
On Sun, 2011-02-20 at 09:35 +, Philip Graham Willoughby wrote: > For this task I would use AES-256 in counter mode with an appropriate nonce > (the counter is trivially derived from the file offset of the block to be > read/written). The key should be derived from the user's password using

Re: [sqlite] Implementing custom xRead() and xWrite() routines for sqlite3_vfs

2011-02-20 Thread Robert Hairgrove
On Sun, 2011-02-20 at 09:35 +, Philip Graham Willoughby wrote: > On 20 Feb 2011, at 09:10, Robert Hairgrove wrote: > > > I am not starting from scratch doing my own encryption; there are enough > > open source libraries publicly available which are good enough f

Re: [sqlite] Implementing custom xRead() and xWrite() routines for sqlite3_vfs

2011-02-20 Thread Robert Hairgrove
On Sat, 2011-02-19 at 17:08 -0800, Roger Binns wrote: > On 02/19/2011 03:40 PM, Robert Hairgrove wrote: > > But before I "try this at home", I thought I would ask if there are any > > caveats I should be aware of? Thanks for any helpful advice! Thanks, Roger ... those a

[sqlite] Implementing custom xRead() and xWrite() routines for sqlite3_vfs

2011-02-19 Thread Robert Hairgrove
My application (written in C++ together with the Qt libraries) uses an in-memory database which is stored to disk using the SQLite backup API at the end of a session or at periodic intervals (i.e. auto-save functionality) and loaded from disk into the memory database at program startup. This