Re: [sqlite] Fossil Feature Request

2018-03-30 Thread Graham Holden
Just adding "?ln" seems to add line numbers: https://www.sqlite.org/src/artifact/810fbfebe12359f1?ln Sent from my Samsung Galaxy S7 - powered by Three Original message From: J Decker Date: 30/03/2018 20:48 (GMT+00:00) To: SQLite mailing list Subject: Re: [sqlite] Fossil Featu

Re: [sqlite] Fossil Feature Request

2018-03-30 Thread Kyle Shannon
On Fri, Mar 30, 2018 at 1:32 PM, J Decker wrote: > Sqlite's Fossile browser can't link line numbers... > > > Add ability to link to lines of source... > > > was trying to share this as another reference for getting UTF8 characters > from strings > > #define READ_UTF8(zIn, zTerm, c) > https://

Re: [sqlite] Fossil Feature Request

2018-03-30 Thread J Decker
On Fri, Mar 30, 2018 at 12:46 PM, Richard Hipp wrote: > On 3/30/18, J Decker wrote: > > Sqlite's Fossile browser can't link line numbers... > > > > > > Add ability to link to lines of source... > > > > > > was trying to share this as another reference for getting UTF8 characters > > from string

Re: [sqlite] Fossil Feature Request

2018-03-30 Thread Richard Hipp
On 3/30/18, J Decker wrote: > Sqlite's Fossile browser can't link line numbers... > > > Add ability to link to lines of source... > > > was trying to share this as another reference for getting UTF8 characters > from strings > > #define READ_UTF8(zIn, zTerm, c) > https://www.sqlite.org/src/ar

Re: [sqlite] Fossil Feature Request

2018-03-30 Thread Scott Robison
On Fri, Mar 30, 2018 at 1:32 PM, J Decker wrote: > Sqlite's Fossile browser can't link line numbers... > > > Add ability to link to lines of source... > > > was trying to share this as another reference for getting UTF8 characters > from strings > > #define READ_UTF8(zIn, zTerm, c) > https://

[sqlite] Fossil Feature Request

2018-03-30 Thread J Decker
Sqlite's Fossile browser can't link line numbers... Add ability to link to lines of source... was trying to share this as another reference for getting UTF8 characters from strings #define READ_UTF8(zIn, zTerm, c) https://www.sqlite.org/src/artifact/810fbfebe12359f1 which is like line 15

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread David Raymond
https://www.sqlite.org/rowvalue.html section 2.1 for ordering. -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Slavin Sent: Friday, March 30, 2018 1:06 PM To: SQLite mailing list Subject: Re: [sqlite] MIN() and MAX() of set o

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Igor Tandetnik
On 3/30/2018 1:04 PM, Peter Da Silva wrote: On 3/30/18, 11:58 AM, "sqlite-users on behalf of Simon Slavin" wrote: can think of to do it is to devise a metric to turn a pair (a, b) into one number. Problem is you can't uniquely order pairs of points. Yes you can. Is (1, 2) greater or les

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread David Raymond
Why not something simpler, like select * from T order by a, b limit 1; --for the min, select * from T order by a desc, b desc limit 1; --for the max? select (select a, b from T order by a, b limit 1) = (1, 2) as ok; -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mai

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Simon Slavin
On 30 Mar 2018, at 6:04pm, Peter Da Silva wrote: > On 3/30/18, 11:58 AM, "sqlite-users on behalf of Simon Slavin" > slav...@bigfraud.org> wrote: >> can think of to do it is to devise a metric to turn a pair (a, b) into one >> number. > > Problem is you can't uniquely order pairs of points. Is

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Peter Da Silva
On 3/30/18, 11:58 AM, "sqlite-users on behalf of Simon Slavin" wrote: > can think of to do it is to devise a metric to turn a pair (a, b) into one > number. Problem is you can't uniquely order pairs of points. Is (1, 2) greater or lesser than (2, 1)? __

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Simon Slavin
On 30 Mar 2018, at 5:55pm, Igor Tandetnik wrote: > I don't think that's what the OP had in mind. They didn't want the smaller of > a and b for each row, but rather the lexicographically smallest (a, b) pair > among all rows. > > Row values support less-than comparison, so it kind of makes sens

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Igor Tandetnik
On 3/30/2018 12:10 PM, Simon Slavin wrote: On 30 Mar 2018, at 3:48pm, Mark Brand wrote: SELECT MIN((a,b)) = (1, 2) ok FROM T; --Error: near line 4: row value misused SELECT MIN((SELECT a, b)) = (1, 2) ok FROM T; --Error: near line 7: row value misused SELECT (1, 2) = MIN(SELECT a, b FROM T

Re: [sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Simon Slavin
On 30 Mar 2018, at 3:48pm, Mark Brand wrote: > SELECT MIN((a,b)) = (1, 2) ok FROM T; > --Error: near line 4: row value misused > > SELECT MIN((SELECT a, b)) = (1, 2) ok FROM T; > --Error: near line 7: row value misused > > SELECT (1, 2) = MIN(SELECT a, b FROM T); > --Error: near line 10: near

Re: [sqlite] sqlite3_column_decltype and affinity

2018-03-30 Thread Simon Slavin
On 30 Mar 2018, at 11:22am, Eric Grange wrote: > Is there a way to have sqlite3_column_decltype return the affinity for an > expression ? You may be referring to sqlite3_column_type() which can be applied to columns returned by a query even if that column is an expression. But if you wan

Re: [sqlite] Fixes to the transliteration table in ext/misc/spellfix.c

2018-03-30 Thread Ian Zimmerman
On 2018-03-30 11:28, Marcin Ciura wrote: > { 0x0426, 0x54, 0x63, 0x00, 0x00 }, /* Ц to Tc */ > { 0x0446, 0x74, 0x63, 0x00, 0x00 }, /* ц to tc */ > > This Cyrillic letter is usually transliterated as Ts. Unless "Tc" is > a hack meant to cover both "Ts" and the rarer transliteration "C", i

[sqlite] MIN() and MAX() of set of row values

2018-03-30 Thread Mark Brand
Hi, Row values make life easier in so many ways, but I was just wondering if there is (or should be or could be) a way to use aggregate MIN() and MAX() on a set of row values. Mark CREATE TABLE T (a, b); INSERT INTO T (a, b) VALUES (1, 2), (1, 3), (2, 3); SELECT MIN((a,b)) = (1, 2) ok  FROM

[sqlite] sqlite3_column_decltype and affinity

2018-03-30 Thread Eric Grange
Hi, Is there a way to have sqlite3_column_decltype return the affinity for an expression ? https://www.sqlite.org/datatype3.html#affinity_of_expressions states that a CAST can be used to specify the affinity of a column, however sqlite3_column_decltype does not report that affinity, as is docume

[sqlite] Fixes to the transliteration table in ext/misc/spellfix.c

2018-03-30 Thread Marcin Ciura
In http://www.sqlite.org/src/artifact/b3a644285cb008f3: { 0x0392, 0x42, 0x00, 0x00, 0x00 }, /* Β to B */ { 0x03B2, 0x62, 0x00, 0x00, 0x00 }, /* β to b */ Although Ancient Greek beta is rendered as B, Modern Greek beta is transliterated as V: https://en.wikipedia.org/wiki/Romanization_of_G