Re: [sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-11 Thread J Decker
SELECT DISTINCT date_time_stamp FROM general ORDER BY date_time_stamp DESC LIMIT 2 isn't it simply to use DISTINCT? On Mon, Jul 11, 2016 at 4:25 PM, Keith Christian wrote: > A table has a column of dates and times that look like this: > > 2015-10-02 07:55:02 >

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-11 Thread dandl
> Try to write a fully standard compliant standard library without using any of > the reserved namespace!!! This is the key point that has been missed so far. The C/C++ standards do not provide a mechanism by which the supplier of a library can reserve or sequester some range of identifiers, for

Re: [sqlite] Bug: SQLite's include guards are reserved identifiers

2016-07-11 Thread Richard Damon
On 7/9/16 11:47 PM, J Decker wrote: Okay if this should change, I would recommand a new standard for all libraries; and since standards are so important maybe make them know about it too... do ... ORG_DOMAIN_APPLICATION_LIBRARY_MODULE_SOURCE_INCLUDED where each piece becomes unqiqe so there's

Re: [sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-11 Thread R Smith
On 2016/07/12 1:25 AM, Keith Christian wrote: A table has a column of dates and times that look like this: 2015-10-02 07:55:02 2015-10-02 07:55:02 2015-10-02 10:00:03 2015-10-02 10:05:02 2015-10-02 10:10:02 Schema: CREATE TABLE general ( id integer primary key autoincrement, server text,

Re: [sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-11 Thread Stephen Chrzanowski
Simons + My answer; select * from (SELECT date_time_stamp FROM general ORDER BY date_time_stamp DESC LIMIT 2) a order by date_time_stamp; On Mon, Jul 11, 2016 at 7:33 PM, Simon Slavin wrote: > > On 12 Jul 2016, at 12:25am, Keith Christian >

Re: [sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-11 Thread Simon Slavin
On 12 Jul 2016, at 12:25am, Keith Christian wrote: > A table has a column of dates and times that look like this: > > 2015-10-02 07:55:02 > 2015-10-02 07:55:02 > 2015-10-02 10:00:03 > 2015-10-02 10:05:02 > 2015-10-02 10:10:02 > > > Schema: > CREATE TABLE general (

[sqlite] Query question: order by ascending, return the two largest values in ascending order

2016-07-11 Thread Keith Christian
A table has a column of dates and times that look like this: 2015-10-02 07:55:02 2015-10-02 07:55:02 2015-10-02 10:00:03 2015-10-02 10:05:02 2015-10-02 10:10:02 Schema: CREATE TABLE general ( id integer primary key autoincrement, server text, date_time_stamp text); Would like to get the

Re: [sqlite] Bug Report: All database opening blocked awaiting wal index rebuild

2016-07-11 Thread Brian Vincent
Yes, you seem to understand the issue. The issue only happens when using shared caches. I've reproduced the issue using both SERIALIZED and MULTITHREADED modes. I'm surprised to hear you say that it might be an inherit limitation or something not necessarily undesirable. Of course, when using

Re: [sqlite] Using CEROD with Python

2016-07-11 Thread Keith Medcalf
Which OS are you running on? On Windows for example, PYTHON will use the version of the sqlite3.dll found in %PYTHONHOME%\DLLs by default. You can change the DLL in that location to the version that you want to use and it will usually work just fine ... > -Original Message- > From:

Re: [sqlite] Updating two virtual table in WinRT under one transaction with debug mode

2016-07-11 Thread Chris Brody
Hi Bence, Is the plugin you maintain open source, or is it a custom plugin for your application? I tried my version with SQLite 3.13.0 on Windows 8.1 (both x86 and x64), Windows Phone 8.1 (arm), Windows 10 (both x86 and x64), and Windows 10 mobile (arm), all in Debug mode, and with my test case

Re: [sqlite] ENABLE_UPDATE_DELETE_LIMIT

2016-07-11 Thread Richard Hipp
On 7/11/16, Janos Levai wrote: > Dear sqlite devs, > > Are there any downsides to setting ENABLE_UPDATE_DELETE_LIMIT when creating > the official amalgamation? Will users of the amalgamation, not > needing ENABLE_UPDATE_DELETE_LIMIT, see any issues? Yes.

Re: [sqlite] Using CEROD with Python

2016-07-11 Thread Richard Hipp
On 7/11/16, David Lederkremer wrote: > I am using a library that is CEROD-enabled and still I cannot open my > CEROD-encrypted DB. It has no password so I'm supposed to use the prefix > ':cerod::' but when I use it like this: > >> import sqlite3 > >> conn =

Re: [sqlite] Updating two virtual table in WinRT under one transaction with debug mode

2016-07-11 Thread Volford Bence
Hi Chris, Your plugin is looking good, but my problem is, that I can maintain only my plugin. I don't have access to the main application. I just get the commands from there, and my main job with this plugin is that I have to keep updated the database, communicate with the server, etc... The

Re: [sqlite] Updating two virtual table in WinRT under one transaction with debug mode

2016-07-11 Thread Chris Brody
Did you see the Cordova-sqlite-storage plugin that I maintain? It supports Windows 8.1, Windows Phone 8.1, and Windows 10 UWP in addition to Android and iOS. It uses the SQLite3-WinRT C++ library which I think is better than using .NET/C#. The following test case works fine for me when I try it

Re: [sqlite] ENABLE_UPDATE_DELETE_LIMIT

2016-07-11 Thread Simon Slavin
On 11 Jul 2016, at 3:17pm, Clemens Ladisch wrote: > Janos Levai wrote: >> Are there any downsides to setting ENABLE_UPDATE_DELETE_LIMIT when creating >> the official amalgamation? Will users of the amalgamation, not >> needing ENABLE_UPDATE_DELETE_LIMIT, see any issues? > >

Re: [sqlite] ENABLE_UPDATE_DELETE_LIMIT

2016-07-11 Thread Clemens Ladisch
Janos Levai wrote: > Are there any downsides to setting ENABLE_UPDATE_DELETE_LIMIT when creating > the official amalgamation? Will users of the amalgamation, not > needing ENABLE_UPDATE_DELETE_LIMIT, see any issues? They might be tempted to use it. Regards, Clemens

[sqlite] ENABLE_UPDATE_DELETE_LIMIT

2016-07-11 Thread Janos Levai
Dear sqlite devs, Are there any downsides to setting ENABLE_UPDATE_DELETE_LIMIT when creating the official amalgamation? Will users of the amalgamation, not needing ENABLE_UPDATE_DELETE_LIMIT, see any issues? Thanks, Janos Levai ___ sqlite-users

[sqlite] Using CEROD with Python

2016-07-11 Thread David Lederkremer
I am using a library that is CEROD-enabled and still I cannot open my CEROD-encrypted DB. It has no password so I'm supposed to use the prefix ':cerod::' but when I use it like this: > import sqlite3 > conn = sqlite3.connect(':cerod::example.db') > cursor = conn.cursor() >

Re: [sqlite] Redundant open *.sqlite-wal file

2016-07-11 Thread Richard Hipp
On 7/11/16, pavel.pimenov wrote: > Hi > > journal_mode=PERSIST ! but sqlite 3.13.0 tries to open a file > *.sqlite-wal SQLite does not know the journal mode until it has opened the database. And it cannot safely open the database without first checking for the

Re: [sqlite] BUG JUST RUN ON THE DUAL :) --> select replace( cast (1 as real) , "." , "") , 1

2016-07-11 Thread Richard Hipp
On 7/10/16, Hakan Yüksel wrote: > Hi i detect a bug theirs result should be same but it is not > > select replace( cast (1 as real) , "." , "") , 1 The "cast(1 as real)" expression results in "1.0". The "replace('1.0', '.', '')" expression results in "10". SQLite

[sqlite] Updating two virtual table in WinRT under one transaction with debug mode

2016-07-11 Thread Volford Bence
Dear SQLite developers, I'm creating a plugin under Cordova framework targeting Win10 (UWP), so my project is in c# with WinRT. I'm using SQLite3 successfully. I have the reference for the SQLite.Net.Core-PCL and SQLite.Net-PCL (v3.1.1), and added the SQLite3 for my Win10 project, using the

[sqlite] Redundant open *.sqlite-wal file

2016-07-11 Thread pavel.pimenov
Hi journal_mode=PERSIST ! but sqlite 3.13.0 tries to open a file *.sqlite-wal Process monitor log: https://yadi.sk/i/nf6MQ4cNtBD4j ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] BUG JUST RUN ON THE DUAL :) --> select replace( cast (1 as real) , "." , "") , 1

2016-07-11 Thread Hakan Yüksel
Hi i detect a bug theirs result should be same but it is not select replace( cast (1 as real) , "." , "") , 1 thanks in advance... ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] [Question]SQLite cannot remove journal file as soon as UPDATE transaction finishes?

2016-07-11 Thread Dan Kennedy
On 07/11/2016 11:18 AM, 刘翔 wrote: Dear SQLite developers, Sqlite version: 3.8.8.3 Linux version: 3.10.31-ltsi Question: We found when updated a sqlite database in emmc disk, it cannot remove journal file as soon as the transaction finished. We know after the transaction finishes, SQLite will