Re: [sqlite] SQLite truncating long records for text-type fields.

2018-07-06 Thread Richard Hipp
On 7/5/18, Jeffrey Mumford  wrote:
>
> It appears that when querying from long text fields, sqlite assumes the
> first instance of the field is the length of all subsequent fields.

When you use ".mode column", it has to make some assumptions along
those lines.  I suggest you set ".mode quote" or ".mode line" in order
to see the full text of ever column.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Subject: Re: Date Search

2018-07-06 Thread Keith Medcalf

This will however only work in all GMT/UT1/UTC.  

If the "input" (ie, the string) is "localtime" then the localtime modifier 
needs to be added to the date() function as in:

date(date_type, 'unixepoch', 'localtime') like '2018-%'

Note that you cannot create an index on the expression date(date_types, 
'unixepoch', 'localtime') so you might be better off (depending on the size of 
the  date_types table) converting and using numeric comparisons since the 
date_type column itself can be indexed).

select *
  from date_types
 where date_type >= strftime('%s', '2018-01-01', 'localtime') 
   and date_type <  strftime('%s', '2019-01-01', 'localtime');


---
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 dmp
>Sent: Friday, 6 July, 2018 10:52
>To: sqlite-users@mailinglists.sqlite.org
>Subject: [sqlite] Subject: Re: Date Search
>
>Keith wrote:
>> Correct.
>> You have stored integer Unix Epoch timestamps.  You cannot do
>"string"
>> searches on integers (at least not ones like what you have asked
>for,
>> which involves conversion of an integer representing a Unix Epoch
>offset
>> to an ISO-8601 string, not to an ordinary "string representation of
>> the integer".
>>
>> There is no "DATE" type in SQLite3 -- only INTEGER, REAL, TEXT, and
>> BLOB -- and no magical conversion of integers into ISO-8601 strings
>> or v/v.
>> ~
>> ~
>> If you want your date_type integer to be converted to a date
>string,
>> you need to use the function for converting integer unix epoch
>offsets
>> into ISO-8601 date strings:
>>
>> SELECT id, date_type FROM date_types WHERE date(date_type,
>'unixepoch')
>> LIKE '2018-%-%';
>>
>> The usual caveats apply for knowing what your timezone is and
>handling
>> such conversions appropriately for your platform (OS).
>
>WHERE date(date_type, 'unixepoch') seems the way to go and will now
>focus
>on that as a solution.
>
>danap.
>
>David Raymond wrote:
>> You have to make everything the same type, either numeric or text.
>> ~
>> ~
>
>R Smith:
>> Why not add to the table both the converted Integer date[i.e:
>> strftime('%s', '2017-01-01')] AND the ISO8601 date [i.e: '2017-01-
>01
>> 00:00:00']?
>>
>> That way you can reference either, use any of them for
>calculations, and
>> filter/lookup by whichever one suits the occasion best.
>> ~
>> ~
>
>Thanks for the repies all. David and R. that would be nice, but the
>context
>here is with a GUI for users so I do not get to define db schema.
>
>I do actually have a test data types table that is loaded with Date
>data
>with both Integer and Text content. Along with also Time, Datetime,
>and Timestamp.
>
>Yes I know all those could be Real or a Blob, but I'm trying to pick
>the
>most likely content that users would store for those types. Integer
>and
>Text seem the most appropriate.
>
>danap.
>
>___
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Subject: Re: Date Search

2018-07-06 Thread dmp
Keith wrote:
> Correct.
> You have stored integer Unix Epoch timestamps.  You cannot do "string"
> searches on integers (at least not ones like what you have asked for,
> which involves conversion of an integer representing a Unix Epoch offset
> to an ISO-8601 string, not to an ordinary "string representation of
> the integer".
>
> There is no "DATE" type in SQLite3 -- only INTEGER, REAL, TEXT, and
> BLOB -- and no magical conversion of integers into ISO-8601 strings
> or v/v.
> ~
> ~
> If you want your date_type integer to be converted to a date string,
> you need to use the function for converting integer unix epoch offsets
> into ISO-8601 date strings:
>
> SELECT id, date_type FROM date_types WHERE date(date_type, 'unixepoch')
> LIKE '2018-%-%';
>
> The usual caveats apply for knowing what your timezone is and handling
> such conversions appropriately for your platform (OS).

WHERE date(date_type, 'unixepoch') seems the way to go and will now focus
on that as a solution.

danap.

David Raymond wrote:
> You have to make everything the same type, either numeric or text.
> ~
> ~

R Smith:
> Why not add to the table both the converted Integer date[i.e:
> strftime('%s', '2017-01-01')] AND the ISO8601 date [i.e: '2017-01-01
> 00:00:00']?
>
> That way you can reference either, use any of them for calculations, and
> filter/lookup by whichever one suits the occasion best.
> ~
> ~

Thanks for the repies all. David and R. that would be nice, but the context
here is with a GUI for users so I do not get to define db schema.

I do actually have a test data types table that is loaded with Date data
with both Integer and Text content. Along with also Time, Datetime,
and Timestamp.

Yes I know all those could be Real or a Blob, but I'm trying to pick the
most likely content that users would store for those types. Integer and
Text seem the most appropriate.

danap.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Time Precision

2018-07-06 Thread dmp
danap wrote:
> SELECT CAST((SELECT (julianday('now', 'localtime') -
> julianday('1970-01-01'))*24*60*60*1000) AS INTEGER);

Keith wrote:
> Are you sure you want to be mixing up timezones?
>
> julianday('1970-01-01') returns the julianday timestamp
> for 1970-01-01 00:00:00 GMT julianday('now', 'localtime')
> returns the julianday timestamp for 'now' in your
> current timezone.

No. You are correct and after my initial posting reply, above, fixed
the Time Precision to your initial suggested example, 'now', only in
the code.

danap.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Typo in window function docs

2018-07-06 Thread Dan Kennedy

On 07/06/2018 03:59 AM, Charles Leifer wrote:

In section 2, the docs read:

The default  is:

RANGE BETWEEN UNBOUNDED PRECEDING TO CURRENT ROW

I believe it should read instead:

RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW


Thanks. Now fixed here:

  http://localhost:8080/ci/463da73728db95b3?sbs=0

Dan.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite truncating long records for text-type fields.

2018-07-06 Thread Richard Hipp
On 7/5/18, Jeffrey Mumford  wrote:
> Version info:
>
> -- Loading resources from /root/.sqliterc

Can you please show us what you have set inside of /root/.sqliterc?


> SQLite version 3.14.2 2016-09-12 18:50:49
> Enter ".help" for usage hints.
>
> Issue:
>
> It appears that when querying from long text fields, sqlite assumes the
> first instance of the field is the length of all subsequent fields.
>
> The result is subsequent fields are displayed truncated to the length of the
> first field. See example data below:
>
> Sample 1: select brightnessMap from Program returns this:
>
> {"currentRange":0,"amplitude":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]}
> 

[sqlite] Feature request: A function to read the value of db->u1.isInterrupted

2018-07-06 Thread sqlite
Feature request: A function to read the value of db->u1.isInterrupted
The purpose of this is so that extensions that implement additional SQL 
functions and/or virtual tables that use loops that aren't VDBE programs can 
still know that it is interrupted.
For example, if the extension uses libcurl then the progress callback can use 
this to know when to stop due to interruption. For example it might use:

int progress_callback(void *clientp,   curl_off_t dltotal,   curl_off_t dlnow,  
 curl_off_t ultotal,  curl_off_t ulnow) {
  return sqlite3_interrupted(clientp);
}

Implementing the sqlite3_interrupted() function (or whatever you want to call 
it) should be very easy to implement. However, it must be added into the 
extension loading mechanism, so if I do it by myself then it will be 
incompatible.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite truncating long records for text-type fields.

2018-07-06 Thread Jeffrey Mumford
Version info:

-- Loading resources from /root/.sqliterc
SQLite version 3.14.2 2016-09-12 18:50:49
Enter ".help" for usage hints.

Issue:

It appears that when querying from long text fields, sqlite assumes the first 
instance of the field is the length of all subsequent fields.

The result is subsequent fields are displayed truncated to the length of the 
first field. See example data below:

Sample 1: select brightnessMap from Program returns this:

{"currentRange":0,"amplitude":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]]}

[sqlite] Static linked sqltclsh.exe

2018-07-06 Thread Petrica Clement Chiriac (Tica2)
Hi,

I play with sqltclsh.exe and vfs apndvfs and is working fine on windows.
I can have one exe file with my app with TCL scripts inside.
Problem is depend of tcl86t.dll and I want to Static linked in sqltclsh.exe.

I compile TCL with
nmake -f makefile.vc clean OPTS=static,symbols,msvcrt SHARED_BUILD=0
and now I have only tclsh86tsgx.exe file. (No tcl86t.dll  DLL)

But what I tray to static build sqltclsh.exe I have this error:

Creating library sqltclsh.lib and object sqltclsh.exp
sqltclsh.obj : error LNK2019: unresolved external symbol
__imp__Tcl_PkgProvideEx referenced in function _Sqlite3_Init

last error part:

sqltclsh.exe target does not exist
cl -nologo -W4 -DINCLUDE_MSVC_H=1   -DSQLITE_OS_WIN=1 -I. -I.
-I.\src -fp:precise -MT -DNDEBUG -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_NONSTDC_NO_WARNINGS -DSQLITE_THREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_TEMP_STORE=1
-DSQLITE_MAX_TRIGGER_DEPTH=100  -DSQLITE_ENABLE_FTS3=1
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_COLUMN_METADATA=1   -O2 -Zi
-Fesqltclsh.exe -wd4054 -wd4055 -wd4100 -wd4127 -wd4130 -wd4152 -wd4189
-wd4206 -wd4210 -wd4232 -wd4305 -wd4306 -wd4702 -wd4706 -DTCLSH=1
-DBUILD_sqlite -Ic:\backend2\tcl-8.6\include sqltclsh.c  /link /DEBUG
/NOLOGO /MACHINE:x86  /LIBPATH:c:\backend2\tcl-8.6\lib  sqlite3res.lo
tcl86.lib
sqltclsh.c
sqltclsh.c(112130): warning C4098: 'minMaxValue': 'void' function returning
a value
sqltclsh.c(112136): warning C4098: 'minMaxFinalize': 'void' function
returning a value
sqltclsh.c(112190): warning C4018: '>=': signed/unsigned mismatch
sqltclsh.c(143381): warning C4245: 'function': conversion from 'int' to
'u32', signed/unsigned mismatch
sqltclsh.c(144060): warning C4456: declaration of 'addr' hides previous
local declaration
sqltclsh.c(144006): note: see declaration of 'addr'
sqltclsh.c(151926): warning C4389: '==': signed/unsigned mismatch
c:\backend2\sqlite.org\sqltclsh.c(143883) : warning C4701: potentially
uninitialized local variable 'addrIfPos1' used
c:\backend2\sqlite.org\sqltclsh.c(143859) : warning C4701: potentially
uninitialized local variable 'addrIfPos2' used
   Creating library sqltclsh.lib and object sqltclsh.exp
sqltclsh.obj : error LNK2019: unresolved external symbol
__imp__Tcl_PkgProvideEx referenced in function _Sqlite3_Init
sqltclsh.obj : error LNK2019: unresolved external symbol __imp__Tcl_Alloc
referenced in function _DbMain
sqltclsh.obj : error LNK2019: unresolved external symbol __imp__Tcl_Free
referenced in function _incrblobClose

I did more combinations without succes.
any help is appreciated,

Thanks,
-- 
Petrica Chiriac
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users