Re: [sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread dave
> -Original Message- > Behalf Of J Decker ... > wrote: > > > Dave. The documentation contains many such catch-all > statements which do ... > > The current decision tree of the particular catch-all > documentation comment ... > > int

Re: [sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread J Decker
On Wed, Dec 13, 2017 at 1:25 PM, petern wrote: > Dave. The documentation contains many such catch-all statements which do > not reflect a full decision tree. The usual cover story will either be (I > paraphrase) : 1. "that's an implementation detail" or 2. "it might

Re: [sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Keith Medcalf
On Wednesday, 13 December, 2017 13:35, Lifepillar wrote: >I am implementing an extension for manipulating IEEE754 decimal >numbers. Numbers are stored as blobs using a standard encoding. >Numbers that are mathematically equal may have different >representations,

Re: [sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread petern
Dave. The documentation contains many such catch-all statements which do not reflect a full decision tree. The usual cover story will either be (I paraphrase) : 1. "that's an implementation detail" or 2. "it might change later, so the documentation can only make a short blanket statement". It is

Re: [sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Simon Slavin
On 13 Dec 2017, at 8:34pm, Lifepillar wrote: > But, (correct me if > I am wrong), if I index the blob column directly, comparisons are > based on memcpy(), which in my case is not what I want. Is it > possible to create an index that somehow uses a custom comparison >

Re: [sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Richard Hipp
On 12/13/17, Lifepillar wrote: > > if I index the blob column directly, comparisons are > based on memcpy(), which in my case is not what I want. Is it > possible to create an index that somehow uses a custom comparison > function instead? No. SQLite always uses

[sqlite] How to index data based on custom comparisons?

2017-12-13 Thread Lifepillar
I am implementing an extension for manipulating IEEE754 decimal numbers. Numbers are stored as blobs using a standard encoding. Numbers that are mathematically equal may have different representations, (e.g., 1.0 may have mantissa 10 and exponent -1 while 1.00 may have mantissa 100 and exponent

Re: [sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread Clemens Ladisch
dave wrote: > "... the pointer returned from sqlite3_value_blob(), .. can be invalidated > by a subsequent call to sqlite3_value_bytes(), ..." > Is that statement still true? The returned pointer is invalidated when you call a function that forces SQLite to convert the value into another type.

Re: [sqlite] DateTime kind stored as undefined

2017-12-13 Thread Simon Slavin
On 13 Dec 2017, at 11:51am, Michał Niegrzybowski wrote: > I have a table which has a column of type DateTime in my code I insert > there an actual UTC Date (which is not the same as my local time). When I > want to gather previously added record, my record

[sqlite] DateTime kind stored as undefined

2017-12-13 Thread Michał Niegrzybowski
Hi All, I encounter a problem with inserting a DateTime.UtcNow to a database, after upgrade from System.Data.SqLite.x64 ver. 1.0.76 to System.Data.SqLite.Core ver. 1.0.106. I have a table which has a column of type DateTime in my code I insert there an actual UTC Date (which is not the same as my

Re: [sqlite] Seasonal syntax

2017-12-13 Thread Warren Young
On Dec 12, 2017, at 10:24 AM, Simon Slavin wrote: > > Santa Clause: SELECT name,hobbies,address FROM people WHERE > behaviour=‘nice’ I think you mean SELECT name,address CASE behaviour WHEN ‘nice' THEN hobbies ELSE 'coal'

[sqlite] API, sqlite3_value_bytes and sqlite3_value_blob...

2017-12-13 Thread dave
I have a question regarding the API documention at http://sqlite.org/c3ref/value_blob.html, which states: "... the pointer returned from sqlite3_value_blob(), .. can be invalidated by a subsequent call to sqlite3_value_bytes(), ..." Is that statement still true? I ask because I notice that the

Re: [sqlite] [EXTERNAL] 2D query

2017-12-13 Thread Hick Gunter
select group_concat(members,'. ')||'.' from (select sex||': '||group_concat(name) as members from people group by sex); group_concat(members,'. ')||'.' --- F: Alex,Jane. M: Alex,John. -Ursprüngliche Nachricht- Von: sqlite-users

Re: [sqlite] 2D query

2017-12-13 Thread Richard Hipp
On 12/13/17, Valentin Davydov wrote: > Given the following table: > > CREATE TABLE people(name,sex); > INSERT INTO people VALUES("Alex","F"); > INSERT INTO people VALUES("Alex","M"); > INSERT INTO people VALUES("Jane","F"); > INSERT INTO people VALUES("John","M"); > > How

Re: [sqlite] 2D query

2017-12-13 Thread David Raymond
select sex, group_concat(name, ', ') from people group by sex; (And don't forget to use single quotes for string literals) -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Valentin Davydov Sent: Wednesday, December 13, 2017 8:57

[sqlite] 2D query

2017-12-13 Thread Valentin Davydov
Hi, all! Given the following table: CREATE TABLE people(name,sex); INSERT INTO people VALUES("Alex","F"); INSERT INTO people VALUES("Alex","M"); INSERT INTO people VALUES("Jane","F"); INSERT INTO people VALUES("John","M"); How to construct a query which returns coalesced sex but individual

Re: [sqlite] Does sqlite have official development testing tool?

2017-12-13 Thread Richard Hipp
On 12/13/17, advancenOO wrote: > I am interested in the source code of sqlite and I want to make some change > to it. > I wondering if sqlite has official development testing to do a full > functional check or evaluate performance lose of my code? > > I have found

[sqlite] Does sqlite have official development testing tool?

2017-12-13 Thread advancenOO
I am interested in the source code of sqlite and I want to make some change to it. I wondering if sqlite has official development testing to do a full functional check or evaluate performance lose of my code? I have found sqlspeedtest1,8 and sqlthreadtest3,4. Is there any other testing I should