[sqlite] FTS4/5 ranking function differences

2016-08-09 Thread Jan Berkel
I'm currently implementing FTS5 in my application and I'm at the stage where I want to rank the results in an efficient way. I'm following the examples from "Appendix A: Search Application Tips" (https://www.sqlite.org/fts3.html#appendix_a). Similar to the example there I have a static weight

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Donald Shepherd
Why don't you build it yourself as a 64 bit executable? On Wed, 10 Aug 2016 at 00:31 Rousselot, Richard A < richard.a.rousse...@centurylink.com> wrote: > I would like to request a SQLite official 64-bit SQLite3.exe CLI (not DLL) > be created. > > I have reviewed the prior discussions regarding

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Paulo Roberto
Thank you for all the answers. Clemens, The counterid in my case is a text field and not an integer. That's why I need to sanitize. Clemens and Keith, As each of my process has its own connection to the database, I tried your solution using BEGIN IMMEDIATE and it worked successfully. Thank you.

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Keith Medcalf
> "BEGIN EXCLUSIVE TRANSACTION;" > "SELECT counter FROM mytable WHERE counterid = ?;" > "UPDATE mytable SET counter=? WHERE counterid = ?;" > "COMMIT TRANSACTION;" > I have a counter that I need to increment and get its previous value in one > operation. > To access this counter I must pass

[sqlite] Sqlite .Net Entity Framework support

2016-08-09 Thread Lloyd
Hi, I wish to use sqlite with my C++/CLI (.Net) application using entity framework (EF). I was referring to this link - https://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki and from the heading I understood that it is an ADO.Net provider. I have also seen nuget package by "drh"

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Rousselot, Richard A
I guess it is a matter of support. Can the people using unpatched, unsupported 32-bit windows instances just live with SQLite 3.13 (or whatever the cutover version)? Are these 32-bit windows users really actively updating SQLite? Can the command line tool interact with a driver? How does a

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Paulo Roberto wrote: > > I found your solution pretty elegant and I tried to implement it. > But after solving a lot of building issues with the sqlite3ext header It does not have to be implemented as a loadable extension. Just copy the lines

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Rousselot, Richard A
As I said, I am not a software engineer. I could spend a few hours figuring this out and be fine but it will be painful for me. I see no downsides in a 64-bit CLI. The last 32-bit Intel CPU was the PIII in 2004, no supported Windows OS requires 32-bit CPUs, the file size may be marginally

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Rousselot, Richard A
>On Aug 9, 2016, at 9:30 PM, Rousselot, Richard A > wrote: > >> I could spend a few hours figuring this out and be fine but it will be >> painful for me. > >Or you can spend many hours waiting for someone to build it for you. How many >hours are you willing

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Warren Young
On Aug 9, 2016, at 9:30 PM, Rousselot, Richard A wrote: > > I could spend a few hours figuring this out and be fine but it will be > painful for me. Or you can spend many hours waiting for someone to build it for you. How many hours are you willing to

Re: [sqlite] 64-bit SQLite3.exe

2016-08-09 Thread David Empson
> On 10/08/2016, at 3:30 PM, Rousselot, Richard A > wrote: > > As I said, I am not a software engineer. I could spend a few hours figuring > this out and be fine but it will be painful for me. > > I see no downsides in a 64-bit CLI. The last 32-bit

Re: [sqlite] Unexpected behavior in LEMON parser generator?

2016-08-09 Thread Richard Hipp
On 8/9/16, Kraus, Stefan wrote: > Hello, > > i have a question regarding the LEMON parser generator: > > I am writing an expression grammar. The token LT means "<", while GT means > ">". > When i use this grammar, everything works as expected: > > %nonassoc LT GT . >

[sqlite] Unexpected behavior in LEMON parser generator?

2016-08-09 Thread Kraus, Stefan
Hello, i have a question regarding the LEMON parser generator: I am writing an expression grammar. The token LT means "<", while GT means ">". When i use this grammar, everything works as expected: %nonassoc LT GT . ex ::= ex LT ex . ex ::= ex GT ex . There are no conflicts, and the

[sqlite] 64-bit SQLite3.exe

2016-08-09 Thread Rousselot, Richard A
I would like to request a SQLite official 64-bit SQLite3.exe CLI (not DLL) be created. I have reviewed the prior discussions regarding 64-bit SQLite3 and the reasoning for which why creating a 64-bit version is denied are "it does not make a real difference", "you can just use ram disks",

[sqlite] How restrict access to SQLite database?

2016-08-09 Thread Jaime Stuardo
Hello, I am developing an application that should use a database. System is very simple that I will try with a file based database system, however, I have found a subject that is very critical for SQLite. Currently, if any person knows that the application database is SQLite, he can open a

[sqlite] Need advice on choosing the right DB.

2016-08-09 Thread Anandan Shanmugam
Hi There, I have a requirement to build a Windows based Point of Sales (POS) application, the application must run on an ATOM based workstation hardware which runs on Windows POS Ready 2009 (with 2 GB RAM) and following are expected out of the application to be built. * The

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Jaime Stuardo
Please, give more details. I have found I can encrypt the database, but how? I am using SQLite manager of Firefox extension. Thanks Jaime -Mensaje original- De: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] En nombre de Igor Korot Enviado el: martes, 09 de agosto

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Jaime Stuardo
No... something free out there? Saluda cordialmente, Jaime Stuardo Bahamondes +56 9 9545 7258 jaime.stuardo http://www.desytec.com Antes de imprimir este correo electrónico, piense bien si es necesario hacerlo: El medio ambiente es cuestión de todos. Esta comunicación

Re: [sqlite] switching from WAL to DELETE mode (Clemens Ladisch)

2016-08-09 Thread Simon Slavin
On 9 Aug 2016, at 1:58pm, Andrii Motsok wrote: > I don't want to bother clients of the first connection with reopening it > twice (DELETE->WAL before modification and WAL->DELETE after). That's not how SQLite works. The journal mode for a database is saved in the

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Clemens Ladisch
Paulo Roberto wrote: > I need some help to do a simple operation, increment a counter and get its > former value. > I could have some race condition, so the transaction must be atomic. > > I also would like to use prepared statements to accomplish that, so I have > less effort sanitizing inputs.

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Richard Hipp wrote: > Or, you could make remember() a two argument function: > >UPDATE mytable SET counter=remember(counter, $ptr)+1 WHERE counterid=$id > A sample implementation for this function can now been seen at

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Simon Slavin
On 9 Aug 2016, at 9:09pm, Paulo Roberto wrote: > My question is: Preparing 4 statements, binding then and calling *sqlite3_step > *for each one of then in order, would have the expected atomic operation > behavior or not? You might be happier with BEGIN IMMEDIATE. No

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Paulo Roberto wrote: > > I need some help to ... increment a counter and get its > former value. > My question is: Preparing 4 statements, binding then and calling > *sqlite3_step > *for each one of then in order, would have the expected atomic operation >

Re: [sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Richard Hipp
On 8/9/16, Richard Hipp wrote: > > UPDATE mytable SET counter=remember(counter)+1 WHERE counterid=? > Or, you could make remember() a two argument function: UPDATE mytable SET counter=remember(counter, $ptr)+1 WHERE counterid=$id Then bind $ptr to the address of the

Re: [sqlite] switching from WAL to DELETE mode (Clemens Ladisch)

2016-08-09 Thread Andrii Motsok
Hi, > What problem do you think you can solve with this? I have one readonly connection. Is being used for reading. From time to time I need to modify data using WAL approach. I don't want to bother clients of the first connection with reopening it twice (DELETE->WAL before modification and

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread jungle Boogie
On 9 August 2016 at 12:11, Jaime Stuardo wrote: > Please, give more details. I have found I can encrypt the database, but how? > I am using SQLite manager of Firefox extension. There's a paid sqlite extension called SEE: https://www.sqlite.org/see/doc/trunk/www/index.wiki

Re: [sqlite] Need advice on choosing the right DB.

2016-08-09 Thread Simon Slavin
On 9 Aug 2016, at 7:47pm, Anandan Shanmugam wrote: > * Data must be stored securely, so that no one can manipulate the > sales figures stored locally. You will need to encrypt your database. I would recommend you use SEE:

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Scott Robison
On Tue, Aug 9, 2016 at 1:16 PM, Jaime Stuardo wrote: > No... something free out there? > If you're limiting yourself to "SQLite manager of Firefox extension" then you probably ought to check with them to see what if any options are available to store the database in an

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Simon Slavin
On 9 Aug 2016, at 8:16pm, Jaime Stuardo wrote: > No... something free out there? Neither of these is as secure as SEE, however they are probably good enough for what you want to do. Simon.

[sqlite] C API - Parameterized Atomic Transactions

2016-08-09 Thread Paulo Roberto
Hello, I need some help to do a simple operation, increment a counter and get its former value. I could have some race condition, so the transaction must be atomic. I also would like to use prepared statements to accomplish that, so I have less effort sanitizing inputs. My problem: I have a

Re: [sqlite] switching from WAL to DELETE mode

2016-08-09 Thread Clemens Ladisch
Andrii Motsok wrote: >> What problem do you think you can solve with this? > > I have one readonly connection. Is being used for reading. > From time to time I need to modify data So this connection is _not_ readonly. Why do you think you cannot use a single read/write connection all the time?

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Igor Korot
Hi, On Tue, Aug 9, 2016 at 9:25 AM, Jaime Stuardo wrote: > Hello, > > > > I am developing an application that should use a database. System is very > simple that I will try with a file based database system, however, I have > found a subject that is very critical for

Re: [sqlite] How restrict access to SQLite database?

2016-08-09 Thread Simon Slavin
On 9 Aug 2016, at 2:25pm, Jaime Stuardo wrote: > Currently, if any person knows that the application database is SQLite, he > can open a SQLite Manager and see database content and eventually to change > data. Is it possible to avoid that in SQLite? You will need to