Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread J Decker
length indicator and are not >> zero-terminated. >> >> --- >> The fact that there's a Highway to Hell but only a Stairway to Heaven >> says a lot about anticipated traffic volume. >> >> >> >-Original Message- >> >From: sqlite-user

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread J Decker
t anticipated traffic volume. > > > >-----Original Message----- > >From: sqlite-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of J Decker > >Sent: Thursday, 19 April, 2018 16:41 > >To: SQLite mailing list > >Subje

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread Keith Medcalf
ticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of J Decker >Sent: Thursday, 19 April, 2018 16:41 >To: SQLite mailing list >Subject: Re: [sqlite] SQLite3 - Search on text field with \0 b

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread J Decker
On Thu, Apr 19, 2018 at 3:37 PM, J Decker wrote: > > > On Thu, Apr 19, 2018 at 3:22 PM, Keith Medcalf > wrote: > >> >> Actually, nothing in the C or C++ world will "go past" the NULL byte >> since the very definition of a C string is a "bunch-o-bytes that

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread J Decker
On Thu, Apr 19, 2018 at 3:22 PM, Keith Medcalf wrote: > > Actually, nothing in the C or C++ world will "go past" the NULL byte since > the very definition of a C string is a "bunch-o-bytes that are non-zero > followed by one that is". > > that doesnt' mean you can use a

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread Keith Medcalf
re's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of J Decker >Sent: Thursday, 19 April, 2018 14:09 >To: SQLite ma

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread J Decker
users-boun...@mailinglists.sqlite.org] > On Behalf Of MARCHAND Loïc > Sent: Thursday, April 19, 2018 8:27 AM > To: sqlite-users@mailinglists.sqlite.org > Subject: [sqlite] SQLite3 - Search on text field with \0 binary data > > I index a file in a SQLite DB. > I create my table with

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread David Raymond
Loïc Sent: Thursday, April 19, 2018 8:27 AM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] SQLite3 - Search on text field with \0 binary data I index a file in a SQLite DB. I create my table with this: CREATE TABLE Record (RecordID INTEGER,Data TEXT,PRIMARY KEY (RecordID)) I read

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread Simon Slavin
On 19 Apr 2018, at 1:27pm, MARCHAND Loïc wrote: > CREATE TABLE Record (RecordID INTEGER,Data TEXT,PRIMARY KEY (RecordID)) > > I read a file, and for each line I add a row on the table. Each line can have > binary data at end. It's not a problem for many chars, but

Re: [sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread J Decker
are you testing this in the sqlite3 shell or in your own program? You should have no issue getting thisdata, sqlite3_column_text followed by sqlite3_column_bytes (the byte count is set when the data is fetched in some format). without modification, you can either excape \0 with'||char(0)||'

[sqlite] SQLite3 - Search on text field with \0 binary data

2018-04-19 Thread MARCHAND Loïc
I index a file in a SQLite DB. I create my table with this: CREATE TABLE Record (RecordID INTEGER,Data TEXT,PRIMARY KEY (RecordID)) I read a file, and for each line I add a row on the table. Each line can have binary data at end. It's not a problem for many chars, but \0 char make a problem. If