[sqlite] A few warnings compiling sqlite (-Wextra)

2019-01-04 Thread J Decker
gcc version 8.2.1 20181127 (GCC) sqlite-amalgamation-326 gcc -Wextra -c sqlite3.c (-Wno-fallthrough) the last one ( sqlite3_trace ) is actually a pretty bad conversion, changing a pointer to a u32 and vice versa; but it is only an internal function so maybe it doesn't matter. The rest are

Re: [sqlite] Broken Foreign key

2018-11-13 Thread J Decker
> > --- > 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-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of J Decker > >Sent:

[sqlite] Broken Foreign key

2018-11-11 Thread J Decker
https://d3x0r.org:444/temporary/broken_fk.tgz (30k) this has a .option.db in it and a test.sh. It turns on foreign_keys, selects from the name_id that it says is a forieng key violation, and inserts into option4_map. option4_map has option_id(PK),parent_id(FK option_id),name_id(FK) option4_name

Re: [sqlite] Regarding CoC

2018-10-22 Thread J Decker
On Mon, Oct 22, 2018 at 12:22 PM R Smith wrote: > > On 2018/10/22 7:09 PM, Simon Slavin wrote: > > > > If you're not going to accept those rules, in exactly the translation > used, you might as well pick something entirely different. > > > > Simon. > > Indeed. Further to this, as I understand a

Re: [sqlite] Fill empty space with random

2018-10-14 Thread J Decker
(sorry for the math err s/16/32/g and s/512/256/ - I double and halfed the wrong directions.) On Sun, Oct 14, 2018 at 7:57 AM J Decker wrote: > > > On Sun, Oct 14, 2018 at 7:24 AM Luuk wrote: > >> On 14-10-2018 16:17, Simon Slavin wrote: >> > On 14 Oct 2018,

Re: [sqlite] Fill empty space with random

2018-10-14 Thread J Decker
On Sun, Oct 14, 2018 at 7:24 AM Luuk wrote: > On 14-10-2018 16:17, Simon Slavin wrote: > > On 14 Oct 2018, at 12:56pm, J Decker wrote: > > > >> Is there maybe a compile option for sqlite to fill empty space in a db > with random data rather than 0 ? > > Ther

Re: [sqlite] Fill empty space with random

2018-10-14 Thread J Decker
On Sun, Oct 14, 2018 at 7:17 AM Simon Slavin wrote: > On 14 Oct 2018, at 12:56pm, J Decker wrote: > > > Is there maybe a compile option for sqlite to fill empty space in a db > with random data rather than 0 ? > > There is not. But > > (A) It may be an easy chang

Re: [sqlite] Fill empty space with random

2018-10-14 Thread J Decker
On Sun, Oct 14, 2018 at 5:48 AM Bob Gailer wrote: > On Oct 14, 2018 7:57 AM, "J Decker" wrote: > > > > Is there maybe a compile option for sqlite to fill empty space in a db > with > > random data rather than 0 ? > > I don't know about compile options.

[sqlite] Fill empty space with random

2018-10-14 Thread J Decker
Is there maybe a compile option for sqlite to fill empty space in a db with random data rather than 0 ? ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Sqlite Doc Error ?

2018-09-07 Thread J Decker
https://www.sqlite.org/limits.html *Maximum Length Of An SQL Statement* The maximum number of bytes in the text of an SQL statement is limited to SQLITE_MAX_SQL_LENGTH which defaults to 100. You can redefine this limit to be as large as the smaller of SQLITE_MAX_LENGTH and 1073741824. but

Re: [sqlite] sqlite3_column_* with error handling

2018-09-04 Thread J Decker
On Tue, Sep 4, 2018 at 2:11 PM Keith Medcalf wrote: > > On Tuesday, 4 September, 2018 14:00, Clemens Ladisch > wrote: > > >Keith Medcalf wrote: > >> 6) If the column type is SQLITE_BLOB > >> a) Retrieve the column value pointer using column_blob > >> b) If the returned pointer is

Re: [sqlite] Strategies to reduce page-loads?

2018-08-31 Thread J Decker
On Thu, Aug 30, 2018 at 4:48 AM Richard Hipp wrote: > On 8/30/18, t...@qvgps.com wrote: > > > > Structure is simple: > > CREATE TABLE Lines(Id LONG PRIMARY KEY, Label VARCHAR(50), Coordinates > > BLOB, Flags INT, StyleId INT); > > And an rtree-index: > > CREATE VIRTUAL TABLE Lines_bb USING

Re: [sqlite] keys

2018-08-24 Thread J Decker
On Fri, Aug 24, 2018 at 4:31 PM wrote: > "The parent key of a foreign key constraint is not allowed to use the > rowid. The parent key must used named columns only." > > Why is this? > Which would be more efficient? > 1) WITHOUT ROWID and column of INTEGER PRIMARY KEY > or > 2) an aliased rowid.

Re: [sqlite] Invalid Blob Length Error Message

2018-08-17 Thread J Decker
On Fri, Aug 17, 2018 at 5:14 AM Tim Streater wrote: > On 17 Aug 2018, at 01:24, Casey Rodarmor wrote: > > > I wrote an erroneous update statement: > > > > ``` > > UPDATE foo SET bar = x'01234'; > > ``` > > > > The error message was: > > > > ``` > > unrecognized token: "x'01234' > > ``` > > > >

Re: [sqlite] PRAGMA case_sensitive_like

2018-08-16 Thread J Decker
https://www.sqlite.org/pragma.html#pragma_pragma_list A pragma can take either zero or one argument. The argument is may be either in parentheses or it may be separated from the pragma name by an equal sign. The two syntaxes yield identical results. In many pragmas, the argument is a boolean. The

Re: [sqlite] "Cheating" at making common tables

2018-08-04 Thread J Decker
I did this sort of thing in Xperdex ( https://sourceforge.net/projects/xperdex/ ) which is a C# thing, and enabled easy creation of DataTables similarly auto creating ID and Name by stripping pluralization from the name. Was working on a similar thing for JS; but keep getting distracted making it

Re: [sqlite] Foreign Key error

2018-07-31 Thread J Decker
. On Mon, Jul 30, 2018 at 11:13 PM Clemens Ladisch wrote: > J Decker wrote: > > CREATE TABLE `option4_name` (`name_id` char(36) NOT NULL,`name` > > varchar(255) NOT NULL default '' CONSTRAINT `name` UNIQUE) > > > FOREIGN KEY (`name_id`) REFERENCES `option4_name`(`nam

Re: [sqlite] Foreign Key error

2018-07-30 Thread J Decker
1f|System Settings I have kinda an old command line tool - but it does the same thing. On Mon, Jul 30, 2018 at 8:11 PM J Decker wrote: > > > On Mon, Jul 30, 2018 at 2:11 PM Keith Medcalf wrote: > >> >> >"SQLITE_ENABLE_LOCKING_STYLE=0",&qu

Re: [sqlite] Foreign Key error

2018-07-30 Thread J Decker
On Mon, Jul 30, 2018 at 2:11 PM Keith Medcalf wrote: > > >"SQLITE_ENABLE_LOCKING_STYLE=0","SQLITE_THREADSAFE=0", > >"SQLITE_OMIT_UTF16","SQLITE_ENABLE_COLUMN_METADATA=1", > >"SQLITE_DEFAULT_FOREIGN_KEYS=1" > > >Is there something about the combination of options I've used? > > Do you get

Re: [sqlite] (no subject)

2018-07-30 Thread J Decker
On Mon, Jul 30, 2018 at 7:09 PM J Decker wrote: > > > On Mon, Jul 30, 2018 at 2:11 PM Keith Medcalf wrote: > >> >> >"SQLITE_ENABLE_LOCKING_STYLE=0","SQLITE_THREADSAFE=0", >> >"SQLITE_OMIT_UTF16","SQLITE_ENABLE_COLUMN_MET

Re: [sqlite] (no subject)

2018-07-30 Thread J Decker
On Mon, Jul 30, 2018 at 2:11 PM Keith Medcalf wrote: > > >"SQLITE_ENABLE_LOCKING_STYLE=0","SQLITE_THREADSAFE=0", > >"SQLITE_OMIT_UTF16","SQLITE_ENABLE_COLUMN_METADATA=1", > >"SQLITE_DEFAULT_FOREIGN_KEYS=1" > > >Is there something about the combination of options I've used? > > Do you get

[sqlite] (no subject)

2018-07-30 Thread J Decker
I have these options ... version 3.23.0. "SQLITE_ENABLE_LOCKING_STYLE=0","SQLITE_THREADSAFE=0","SQLITE_OMIT_UTF16","SQLITE_ENABLE_COLUMN_METADATA=1", "SQLITE_DEFAULT_FOREIGN_KEYS=1" This is the end of operations... It's starting to get an option...

Re: [sqlite] how to know which database is corrupted

2018-07-24 Thread J Decker
On Tue, Jul 24, 2018 at 5:11 PM Simon Slavin wrote: > On 24 Jul 2018, at 11:34pm, J Decker wrote: > > > If the system rebooted; did a screen size change, and terminated the > > program, it's possible it coild cause corruption. > > Step 1: use the command-line t

Re: [sqlite] how to know which database is corrupted

2018-07-24 Thread J Decker
On Tue, Jul 24, 2018 at 1:47 PM Simon Slavin wrote: > On 24 Jul 2018, at 8:43pm, J Decker wrote: > > > I have a database that got corrupted; was working on implementing > automatic > > recovery > > It would be a million times better to figure out how the corr

[sqlite] how to know which database is corrupted

2018-07-24 Thread J Decker
I have a database that got corrupted; was working on implementing automatic recovery I have a callback configured on SQLITE_CONFIG_LOG sqlite3_config( SQLITE_CONFIG_LOG, errorLogCallback, 0); Which is global, and does not identify the instance. I figured, I could just easily register the

Re: [sqlite] Issue using SEE

2018-07-20 Thread J Decker
On Fri, Jul 20, 2018 at 11:05 AM Keith Medcalf wrote: > > Firstly, the SQLITE_DLL define does not exist (is this a bug in the docs>? > Secondly you did not define SQLITE_HAS_CODEC as required to integrate the > SEE codec/ > Thirdly a .dll file cannot be created with ar. ar is for creating >

Re: [sqlite] Round-tripping SQLite back and forth between text representation.

2018-07-09 Thread J Decker
does it have to be text? There was serialization added to sqlite https://www.sqlite.org/c3ref/serialize.html On Mon, Jul 9, 2018 at 5:52 PM Randall Smith wrote: > I'm curious if there is some standard or normal way to convert a SQLite DB > to a text representation, and then recreate the DB

Re: [sqlite] Use with Visual Studio

2018-07-09 Thread J Decker
there's also nuget package for sqlite which handles updates pretty well. (IMO) On Sun, Jul 8, 2018 at 11:13 PM Mike King wrote: > Same here. Again, I download it from the main system.data site. No problems > at all. > > Cheers > > On Mon, 9 Jul 2018 at 06:57, Chris Locke wrote: > > > I use

Re: [sqlite] Mailing list shutting down...

2018-06-13 Thread J Decker
On Wed, Jun 13, 2018 at 5:17 PM Simon Slavin wrote: > 13 Jun 2018, at 11:52pm, Bob Friesenhahn > wrote: > > > The problem is knowing what "one" means. The subscription request is > likely submitted via http/https into the web form and using a bogus email > subscription address (of the

Re: [sqlite] [fossil-users] Mailing list shutting down...

2018-06-13 Thread J Decker
could use Gitter ( https://gitter.in ) is nice; emails on directed messges; retains discussion histories; integrates with various other platforms... git in particular such a referecning issues and pull requests with just # supports markdown formatting; which makes talking about `code fragments`

Re: [sqlite] Idea: defining table-valued functions directly in SQL

2018-06-10 Thread J Decker
On Sun, Jun 10, 2018 at 7:48 AM Simon Slavin wrote: > On 10 Jun 2018, at 2:40pm, J Decker wrote: > > > forget contributing code ... but funding? how much can I pay to get > better > > NUL support? > > Can you tell us what's wrong with NUL support ? > I have, re

Re: [sqlite] Idea: defining table-valued functions directly in SQL

2018-06-10 Thread J Decker
On Sat, Jun 9, 2018 at 7:37 PM Andy Goth wrote: > > This is probably not going to be added > until SQLite's primary developers themselves decide they need it, or > until someone else decides it's important enough to them to contribute > code and/or funding. > forget contributing code ... but

Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-09 Thread J Decker
On Sat, Jun 9, 2018 at 10:00 AM skywind mailing lists < mailingli...@skywind.eu> wrote: > Hi, > > what is your experience with temporary files requested by SQLite3 on > Android? I am using SQLite3 natively on Android - I compiled SQLite3 by > myself - and get an error when SQLite3 tries to create

Re: [sqlite] SQLite3 Error: Unable to open database file when file path has accents (e.g. é or è)

2018-05-08 Thread J Decker
On Tue, May 8, 2018 at 2:11 PM, Richard Hipp wrote: > On 5/8/18, Francis Kus wrote: > > I am able to open my database file if the path contains no accents. > However, > > if I change even one letter to an accented letter (e.g. replace 'e' with > > 'é'),

Re: [sqlite] Stored Procedures

2018-05-08 Thread J Decker
maybe Virtual tables? can register functions of various types... mostly since the typical usage of sqlite is as a tightly coupled library, a function in your application is a 'stored procedure'. http://www.sqlite.org/c3ref/update_hook.html There are hooks which would trigger callbacks like

Re: [sqlite] Getting statement column data types on Android

2018-05-07 Thread J Decker
https://www.sqlite.org/c3ref/column_blob.html int sqlite3_column_type(sqlite3_stmt*, int iCol); ? On Mon, May 7, 2018 at 4:28 PM, Bart Smissaert wrote: > Yes, thanks, that might be the best way, but it can get a bit complicated > with complex SQL. > > RBS > > > > On

Re: [sqlite] Map a field type to a best suited sqlite3_result_* call

2018-05-05 Thread J Decker
On Sat, May 5, 2018 at 4:08 AM, Max Vlasov <max.vla...@gmail.com> wrote: > On Sat, May 5, 2018 at 1:19 PM, J Decker <d3c...@gmail.com> wrote: > > > https://www.sqlite.org/c3ref/column_blob.html > > > > The sqlite3_column_type() routine returns th

Re: [sqlite] Map a field type to a best suited sqlite3_result_* call

2018-05-05 Thread J Decker
https://www.sqlite.org/c3ref/column_blob.html The sqlite3_column_type() routine returns the datatype code for the initial data type of the result column. The returned value is one of SQLITE_INTEGER, SQLITE_FLOAT, SQLITE_TEXT, SQLITE_BLOB, or SQLITE_NULL. The return value of sqlite3_column_type()

Re: [sqlite] Yes - Getting SPAM from Using Mailing List

2018-04-28 Thread J Decker
https://productforums.google.com/forum/?utm_medium=email_source=footer#!msg/gmail/vaG8BpMPov0/JqRR4wk2CQAJ On Sat, Apr 28, 2018 at 3:05 AM, J Decker <d3c...@gmail.com> wrote: > > > On Sat, Apr 28, 2018 at 3:01 AM, Luuk <luu...@gmail.com> wrote: > >> >>

Re: [sqlite] Yes - Getting SPAM from Using Mailing List

2018-04-28 Thread J Decker
On Sat, Apr 28, 2018 at 3:01 AM, Luuk <luu...@gmail.com> wrote: > > On 28-4-2018 11:26, J Decker wrote: > > On Sat, Apr 28, 2018 at 2:08 AM, Luuk <luu...@gmail.com> wrote: > > > >> On 28-4-2018 07:36, Luuk wrote: > >>> On 27-4-2018 20:57

Re: [sqlite] Yes - Getting SPAM from Using Mailing List

2018-04-28 Thread J Decker
On Sat, Apr 28, 2018 at 2:08 AM, Luuk wrote: > On 28-4-2018 07:36, Luuk wrote: > > On 27-4-2018 20:57, Denis Burke wrote: > >> I know steps were taken to reduce it, but just confirming it is still > going > >> on today. > >> ___ > >>

Re: [sqlite] Window functions

2018-04-25 Thread J Decker
What are 'window functions'? If you mean GUI; that's really outside the scope of Sqlite; and whatever environment you're in can provide your GUI; https://www.npmjs.com/package/sack-gui for instance for Javascript(Node.js). On Wed, Apr 25, 2018 at 12:04 PM, Charles Leifer

Re: [sqlite] "Tagging" SQLite tables with attributes for introspection.

2018-04-20 Thread J Decker
You could make a extra table that has a foreign key on sqlite_master and add extra attributes... You could add comments ( -- ) in the create statemtents; and parse those back out ... On Fri, Apr 20, 2018 at 3:52 PM, Randall Smith wrote: > I'm writing some code to do

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

2018-04-19 Thread J Decker
, storing and retrieiving STRINGS with NUL characters is easily handled which is why I started with my first response of 'what tool are you actually using?' In the storage, both the length and data are stored. (have been since 3.0 or before) On Thu, Apr 19, 2018 at 4:11 PM, J Decker <

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

2018-04-19 Thread J Decker
s contain an embedded length for any > given value of X -- C strings do not). > > Obviously "javascript" strings contain a 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 abou

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 <d3c...@gmail.com> wrote: > > > On Thu, Apr 19, 2018 at 3:22 PM, Keith Medcalf <kmedc...@dessus.com> > wrote: > >> >> Actually, nothing in the C or C++ world will "go past" the NULL byte >> sinc

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 J Decker
On Thu, Apr 19, 2018 at 1:49 PM, David Raymond wrote: > After a little testing, of the core functions: > > Affected by \x00: > substr > like > length > quote > replace when you're trying to replace the \x00 > > Not affected by \x00: > plain ol select > instr > lower >

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)||'

Re: [sqlite] Are you getting spam when you post to sqlite-users?

2018-04-17 Thread J Decker
On Tue, Apr 17, 2018 at 3:11 PM, Rich Shepard wrote: > On Tue, 17 Apr 2018, Simon Slavin wrote: > > Okay, that's enough. Thanks for the help, everyone. >> > > Simon, > > FWIW, I haven't seen any spam from this mail list. I do run my own MTA > which aggressively

Re: [sqlite] Are you getting spam when you post to sqlite-users ?

2018-04-17 Thread J Decker
having replied in this thread I got one. (can the real simon slavin please stand up?) On Tue, Apr 17, 2018 at 3:00 PM, Warren Young wrote: > On Apr 17, 2018, at 3:39 PM, Simon Slavin wrote: > > > > Are you getting a new dating-spam each time you post

Re: [sqlite] Are you getting spam when you post to sqlite-users ?

2018-04-17 Thread J Decker
march 26, apr 7 I found one each day in 'spam' On Tue, Apr 17, 2018 at 2:39 PM, Simon Slavin wrote: > Dear list-posters, > > Are you getting a new dating-spam each time you post to this list ? If > you are, please post a brief follow-up to this message. Please do /not/ >

[sqlite] Constraints must be defined last?

2018-04-11 Thread J Decker
Is there something about SQL that requires constraints to follow all column definitions? sqlite> create table `option4_blobs` (`option_id` char(36) default '0', CONSTRAINT `value_id` UNIQUE (`option_id`),`binary` blob, FOREIGN KEY (`option_id`) REFERENCES `option4_map`(`option_id`)ON UPDATE

[sqlite] Insert with foreign keys enabled prevented in transaction

2018-04-11 Thread J Decker
I was trying to debug this set of commands, which is actually run on two connections within the same process... but that detail apparently doesn't matter. PRAGMA foreign_keys=on; create table `option4_name` (`name_id` char(36) NOT NULL,`name` varchar(255) NOT NULL default

Re: [sqlite] Help using 'attach database' or Why is this an error?

2018-04-11 Thread J Decker
On Wed, Apr 11, 2018 at 7:54 AM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > Try this: > > attach database 'test.db' as con2; > ahh that makes sense. I'll split this into a separte thread for the real issue... > > On 4/11/18, 9:51 AM, "sqlit

[sqlite] Help using 'attach database' or Why is this an error?

2018-04-11 Thread J Decker
When I attempt to use attach database I get an error about 'no such column' M:\sqlite3\sqlite3\build>sqlite3 test.db SQLite version 3.23.0 2018-04-02 11:04:16es Enter ".help" for usage hints. sqlite> attach database test.db as con2; Error: no such column: test.db sqlite> I was trying to debug

Re: [sqlite] Fossil Feature Request

2018-03-30 Thread J Decker
On Fri, Mar 30, 2018 at 12:46 PM, Richard Hipp <d...@sqlite.org> wrote: > On 3/30/18, J Decker <d3c...@gmail.com> wrote: > > Sqlite's Fossile browser can't link line numbers... > > > > > > Add ability to link to lines of source... > > > >

[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

Re: [sqlite] json question

2018-03-28 Thread J Decker
On Tue, Mar 27, 2018 at 8:22 PM, Ian Zimmerman wrote: > On 2018-03-27 19:26, Keith Medcalf wrote: > > > Actually, it is very simple and straightforward to implement > > hierarchical structures using Relational Database Models. > > But not recursive structures (or to be

[sqlite] Feat Req Get Aliased Table Name.

2018-03-18 Thread J Decker
https://sqlite.org/c3ref/column_database_name.html Source Of Data In A Query Result The names returned are the original un-aliased names of the database, table, and column. Okay. and there's... https://sqlite.org/c3ref/column_name.html These routines return the name assigned to a particular

Re: [sqlite] Question regarding 3.23.0 (pending) and TRUE/FALSE

2018-03-02 Thread J Decker
On Fri, Mar 2, 2018 at 4:19 AM, Richard Hipp wrote: > On 3/2/18, Olivier Mascia wrote: > > > > What values will be considered FALSE, and hence will TRUE be NOT FALSE or > > equality to some other specific value? > > I have a note to provide additional

Re: [sqlite] sqlite problem - field names missing in select

2018-02-23 Thread J Decker
https://sqlite.org/c3ref/column_name.html You can get the column names. On Fri, Feb 23, 2018 at 4:46 AM, M wrote: > sqlite has an integral problem, field names cannot be selected each one > inside a program, there is way to do it, but it is not straight and >

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-20 Thread J Decker
On Mon, Feb 19, 2018 at 7:49 PM, petern wrote: > There are other uses for padding strings besides user reports. Consider > scalar representations of computations for example. Also: > > 1.There was no mention of user display formatting in Ralf's original > report.

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-19 Thread J Decker
On Mon, Feb 19, 2018 at 5:38 PM, petern wrote: > FYI. See http://www.sqlite.org/src/timeline for the equivalent DRH > checkins: http://www.sqlite.org/src/info/c883c4d33f4cd722 > Hopefully that branch will make a forthcoming trunk merge. [Printing > explicit nul

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-19 Thread J Decker
On Mon, Feb 19, 2018 at 2:54 AM, Ralf Junker wrote: > On 19.02.2018 09:50, Rowan Worth wrote: > > What is your expected answer for: >> >> select length(printf ('%4s', 'です')) >> > > 'です' are 2 codepoints according to > >

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-19 Thread J Decker
On Mon, Feb 19, 2018 at 3:21 AM, Cezary H. Noweta wrote: > Hello, > > On 2018-02-18 00:36, Richard Hipp wrote: > >> The current behavior of the printf() function in SQLite, goofy though >> it may be, exactly mirrors the behavior of the printf() C function in >> the standard

Re: [sqlite] invalid date time

2018-02-18 Thread J Decker
On Sun, Feb 18, 2018 at 10:02 PM, Olivier Leprêtre wrote: > Hi, > > > > I have an sqlite database with wrong information in a timestamp field. > Using > System.Data.Sqlite, I want to get this information as a string inside a > very > simple loop. > > > > while (i <

Re: [sqlite] printf() problem padding multi-byte UTF-8 code points

2018-02-17 Thread J Decker
On Sat, Feb 17, 2018 at 3:36 PM, Richard Hipp wrote: > On 2/17/18, Ralf Junker wrote: > > Example SQL: > > > > select > >length(printf ('%4s', 'abc')), > >length(printf ('%4s', 'äöü')), > >length(printf ('%-4s', 'abc')), > >length(printf

Re: [sqlite] Different kind of constraint

2018-02-11 Thread J Decker
Just a thought; a thumbnail/cover image seems like somehting that is often gotten before lots of other data, and maybe storing that alone in a table of covers would keep that index shorter for the entry pages... And then you could enforce unique parent id on the cover and not on the content. On

Re: [sqlite] sqlite3_expanded_sql is reading freed heap memory

2018-02-06 Thread J Decker
can you use sqlite3_sql instead; it won't be complete information... but ya, the time that expanded_sql is valid is really only while the bound parameters are still valid. (could re-bind parameters when done I guess) On Tue, Feb 6, 2018 at 1:07 PM, Jens Alfke wrote: >

Re: [sqlite] Auto Index Warnings; key on deterministic functions

2018-02-05 Thread J Decker
--- > 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-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of J Decker > >Sent: Monday,

[sqlite] Auto Index Warnings; key on deterministic functions

2018-02-05 Thread J Decker
I have a couple tables like... create table tableA ( pk PRIMARY KEY, dataA ) create table tableB ( fk, dataB, FOREIGN KEY (fk) REFERENCES tableA(pk) ON DELETE CASCADE ) if the table was also ON UPDATE CASCADE could it slave to the same index as primary key? doing a LEFT JOIN on the tables I

Re: [sqlite] Vetting SQLite

2018-02-05 Thread J Decker
On Mon, Feb 5, 2018 at 5:04 PM, Richard Hipp wrote: > On 2/5/18, Stephen Chrzanowski wrote: > > I was surprised to see that statement, so, checking my system, this isn't > > true. Win7Pro-x64. > > It's on Windows10. > M:\>dir c:\windows\SysWOW64\*sqlite*

[sqlite] @sqlite-tool-maintainers Table Name Information?

2018-01-31 Thread J Decker
I would think as output for a GUI for browsing sqlite databases, knowing table name is useful. But what if the SQL command given contains an alias of the table name as in a table that is self-joined? Wouldn't it also be useful to be able to get that alias? And in face default to Alias and show

Re: [sqlite] sqlite3_set_last_insert_rowid

2018-01-30 Thread J Decker
Probably best reserved for initialization of a shard of a database where you can set next to last of a prior .db. On Tue, Jan 30, 2018 at 9:14 AM, petern wrote: > For one, within a function that does an INSERT, set_last_insert_rowid makes > it possible to "pop"

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
; isn't an API export, and calling exec() on the same DB handle will > only reenter the user defined like(). > If calling the default implementation from the overloaded one is > impossible, I'd say the LIKE overload system has a bug. > > > Peter > > > > > > > > &

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
agical C-Style-String that is not > > actually a C-Style-String, without explicitly stating this. > > > > SQLite3 does handle non-C-Ctyle-Strings. They are called "blobs". > > > > --- > > The fact that there's a Highway to Hell but only a Stairway to Hea

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
> --- > 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-users [mailto:sqlite-users- > >boun...@mailinglists.sqlite.org] On Behalf Of J Decker &

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 3:56 PM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > On 2018-01-26, at 17:05, J Decker <d3c...@gmail.com> wrote: > > On Fri, Jan 26, 2018 at 1:21 PM, Peter Da Silva < > > peter.dasi...@flightaware.com> wrote: > >>

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 1:21 PM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > Sqlite uses NUL as the string terminator internally, the published API > specifies has stuff like this all over the place: > > > In those routines that have a fourth argument, its value is the number > of

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 11:41 AM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > On 1/26/18, 1:37 PM, "sqlite-users on behalf of J Decker" < > sqlite-users-boun...@mailinglists.sqlite.org on behalf of d3c...@gmail.com> > wrote: > >doesn't get 2

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 10:44 AM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > On 1/26/18, 12:40 PM, "sqlite-users on behalf of J Decker" < > sqlite-users-boun...@mailinglists.sqlite.org on behalf of d3c...@gmail.com> > wrote: > > reads the byte

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 10:35 AM, Tim Streater wrote: > On 26 Jan 2018, at 18:12, Keith Medcalf wrote: > > > Actually, EOF (0xFF) *is* part of a text file, and is the byte in an > ASCII > > byte-stream that indicates end-of-file. > > First I've heard

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 10:22 AM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > On 1/26/18, 12:12 PM, "sqlite-users on behalf of Keith Medcalf" < > sqlite-users-boun...@mailinglists.sqlite.org on behalf of > kmedc...@dessus.com> wrote: > > Actually, EOF (0xFF) *is* part of a text file,

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Fri, Jan 26, 2018 at 5:55 AM, Peter Da Silva < peter.dasi...@flightaware.com> wrote: > What is the goal of this discussion? Changing the string terminator SQLite > uses? I think it's almost 50 years too late for that, but I'm sure that if > Unicode and UTF8 had been a thing in 1970 then C

Re: [sqlite] UTF8 and NUL

2018-01-26 Thread J Decker
On Thu, Jan 25, 2018 at 7:57 PM, J Decker <d3c...@gmail.com> wrote: > NUL is a valid utf8 character > but FF is never valid. (would be like a 36 bit length specification) > and practically anthing more than F8 is invalid utf8 character. > Other than BOM > https://

[sqlite] UTF8 and NUL

2018-01-25 Thread J Decker
NUL is a valid utf8 character but FF is never valid. (would be like a 36 bit length specification) and practically anthing more than F8 is invalid utf8 character. Other than BOM https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8 EF BB BF 239 187 191 // EF - 80 | 3b - 80 | 3f ( 0xfeff ) Many

Re: [sqlite] SQLite DELUXE Re: sqlite command line tool NUL support

2018-01-24 Thread J Decker
adopted despite having zero impact by > conditional compilation switch: http://sqlite.chncc.eu/ > > The argument against improving generality of the official release because > it slows down some phones will never go away. Your changes may have to > shadow the official release for

Re: [sqlite] sqlite command line tool NUL support

2018-01-24 Thread J Decker
This is a picture. This is a tortoise git log view of merges. https://drive.google.com/open?id=1RosGlprJRoutFsou2XDRlflxc8xWoHks On Wed, Jan 24, 2018 at 8:59 AM, J Decker <d3c...@gmail.com> wrote: > > So for output of a select in the shell ( unlike .dump ) is this. > >

[sqlite] sqlite command line tool NUL support

2018-01-24 Thread J Decker
So for output of a select in the shell ( unlike .dump ) is this. for(i=1; iout, ",%s", sqlite3_column_text(pSelect, i)); } option 1) add text conversion in the column_text to escape NUL characters. in TEXT... then everyone everywhere would inherit the

Re: [sqlite] Minor JSON output bug (infinity)

2018-01-22 Thread J Decker
On Mon, Jan 22, 2018 at 6:00 PM, Alexander Beedie < alexander.m.bee...@gmail.com> wrote: > Test-case / repro: > “SELECT JSON_ARRAY(1e,-1e,NULL)” > > Actual output: > ‘[Inf,-Inf,null]’ > > Expected output: > ‘[Infinity,-Infinity,null]’ > > All JSON parsers I have tried fail on “Inf”, but

Re: [sqlite] .DUMP displays floats differently from SELECT

2018-01-22 Thread J Decker
There was work to 'speed up float formatting' which although fast is apparently inaccurate. One I Was working on was pretty fast, but didn't format things correctly because of minor decimals. On Mon, Jan 22, 2018 at 9:14 AM, David Raymond wrote: > While maybe different

Re: [sqlite] sqlite command line tool fails to dump data

2018-01-22 Thread J Decker
On Sun, Jan 21, 2018 at 11:48 PM, Clemens Ladisch <clem...@ladisch.de> wrote: > J Decker wrote: > >> *If any NUL characters occur at byte| offsets less than the value of the > >> fourth parameter then the resulting| string value will contain embedded > >> NULs

Re: [sqlite] Feature request for the Shell Tool: .mode json

2018-01-21 Thread J Decker
On Sun, Jan 21, 2018 at 3:50 PM, Stadin, Benjamin < benjamin.sta...@heidelberg-mobil.com> wrote: > Hi Simon, > > I recently wrote a tool to convert an arbitrary SQLite result set to > properly typed json key/value pairs, using the SQLite type affinity of the > objects. Though the code is in C++.

Re: [sqlite] sqlite command line tool fails to dump data

2018-01-21 Thread J Decker
On Sun, Jan 21, 2018 at 7:42 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > J Decker wrote: > > insert into test (a,b) values ( ?,? ) > > bind 'hello\0world.' 'te\0st' > > <http://www.sqlite.org/c3ref/bind_blob.html> says: > | If a non-n

[sqlite] sqlite command line tool fails to dump data

2018-01-21 Thread J Decker
sqlite test.db create table test (a,b) insert into test (a,b) values ( ?,? ) bind 'hello\0world.' 'te\0st' .dump table -- output CREATE TABLE test (a,b); INSERT INTO test VALUES('hello','te'); ___ sqlite-users mailing list

Re: [sqlite] Feature request for the Shell Tool: .mode json

2018-01-21 Thread J Decker
On Sat, Jan 20, 2018 at 9:54 PM, Simon Slavin wrote: > Feature request for the Shell Tool: ".mode json". > > Output should be as a JSON array of objects, with one object for each row > of the table. Output should start with the "[" character and end with > "]". Rows

Re: [sqlite] sqlite3_column_name with alias

2018-01-18 Thread J Decker
There is sqlite3_column_origin_name( stmt, n ) ; is that also the alias? instead of sqlite3_column_name(stmt,n ); or does there need to be sqlite3_column_original that really returns the not alias? On Mon, Jan 8, 2018 at 3:21 AM, Bart Smissaert wrote: > > As you can

Re: [sqlite] sqlite_column_table_name() and table alias name

2018-01-15 Thread J Decker
be the same value sorted by sqlite nicely) > That is what I've implemented in the PR I sent to node-sqlite3. > > > On 16 Jan 2018, at 3:59 AM, J Decker <d3c...@gmail.com> wrote: > > > > One more example for the road... > > > > create table fruit ( fr

Re: [sqlite] sqlite_column_table_name() and table alias name

2018-01-15 Thread J Decker
from fruit join fruit_color USING(fruit_id) join color as c USING(color_id)` ). wouldn't make that the production version of data to rely on... and wouldn't want to query 1M records with triplicated values :) On Mon, Jan 15, 2018 at 7:07 AM, J Decker <d3c...@gmail.com> wrote: > > > On M

  1   2   3   4   >