Hi, Simon,
On Thu, Jul 5, 2018 at 11:45 AM, Simon Slavin wrote:
> On 5 Jul 2018, at 4:51pm, Igor Korot wrote:
>
>> Is there a way to get which command was executed?
>> Or which table was added/changed/dropped?
>
> There is no reason for SQLite to record the information you want. If a
> connect
On 5 Jul 2018, at 4:51pm, Igor Korot wrote:
> Is there a way to get which command was executed?
> Or which table was added/changed/dropped?
There is no reason for SQLite to record the information you want. If a
connection you have no control over changes your schema you can't do anything
abou
Hi,
On Tue, Jun 19, 2018 at 1:56 PM, Richard Hipp wrote:
> On 6/19/18, Igor Korot wrote:
>> Hi, Wout,
>>
>> On Tue, Jun 19, 2018 at 1:31 PM, Wout Mertens
>> wrote:
>>> you can query the table with
>>> https://www.sqlite.org/pragma.html#pragma_table_info
>>
>> Let me give you a scenario:
>>
>> 1
Hi, again,
This page: https://www.sqlite.org/threadsafe.html, says that the
default mode for SQLite is "Serialized".
It is also said that in this mode it is safe to use SQLite in multiple threads.
I am planning to do the polling in the secondary thread and SQLite was
compiled with the default para
David,
On Wed, Jun 20, 2018 at 9:12 PM, David Empson wrote:
> Apart from the SQLITE_OK vs SQLITE_ROW/DONE check on the sqlite3_step() call
> mentioned already, you also have the third parameter to sqlite_prepare_v2()
> wrong: nByte = NULL will translate to nByte = 0 which is documented as “no
Apart from the SQLITE_OK vs SQLITE_ROW/DONE check on the sqlite3_step() call
mentioned already, you also have the third parameter to sqlite_prepare_v2()
wrong: nByte = NULL will translate to nByte = 0 which is documented as “no
prepared statement is generated”. Therefore stmt is not valid and
s
;
On Thu, Jun 21, 2018 at 12:03 PM, Igor Korot wrote:
> Richard,
>
> On Wed, Jun 20, 2018 at 8:17 PM, Richard Hipp wrote:
>> On 6/20/18, Igor Korot wrote:
>>> if( ( res = sqlite3_step( stmt ) ) == SQLITE_OK )
>>
>> sqlite3_step() returns SQLITE_ROW when it has data, not
Richard,
On Wed, Jun 20, 2018 at 8:17 PM, Richard Hipp wrote:
> On 6/20/18, Igor Korot wrote:
>> if( ( res = sqlite3_step( stmt ) ) == SQLITE_OK )
>
> sqlite3_step() returns SQLITE_ROW when it has data, not SQLITE_OK.
But SQLITE_ROW value is not 21 - its 101.
Thank you.
On 6/20/18, Igor Korot wrote:
> if( ( res = sqlite3_step( stmt ) ) == SQLITE_OK )
sqlite3_step() returns SQLITE_ROW when it has data, not SQLITE_OK.
--
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@
Hi, guys,
I put in this code:
if( sqlite3_prepare_v2( m_db, "PRAGMA
schema_version", NULL, &stmt, NULL ) == SQLITE_OK )
{
if( ( res = sqlite3_step( stmt ) ) == SQLITE_OK )
{
m_schema
On 20 Jun 2018, at 12:29pm, Simon Slavin wrote:
> On 20 Jun 2018, at 7:24am, Peter Johnson wrote:
>
>> Is it possible to create a trigger on sqlite_master which calls a
>> user-defined function AFTER INSERT?
>
> No. sqlite_master is modified using internal methods, not using an INSERT
> comm
On 20 Jun 2018, at 7:24am, Peter Johnson wrote:
> Is it possible to create a trigger on sqlite_master which calls a
> user-defined function AFTER INSERT?
No. sqlite_master is modified using internal methods, not using an INSERT
command. TRIGGERs on it won't work.
Simon.
_
On 2018/06/20 7:05 AM, Igor Korot wrote:
One more question:
I presume I should call PRAGMA schema_version right after connection
has been made,
cache the value returned and then create a secondary thread which will
call this query continuously.
Am I right?
That is up to you, but what you nee
--Re-posted from correct address - apologies if this comes through twice--
On 2018/06/20 7:05 AM, Igor Korot wrote:
One more question:
I presume I should call PRAGMA schema_version right after connection
has been made,
cache the value returned and then create a secondary thread which will
call
But that trigger would be executed in a context of a process modifying
the database.
2018-06-20 8:24 GMT+02:00, Peter Johnson :
> Is it possible to create a trigger on sqlite_master which calls a
> user-defined function AFTER INSERT?
>
> That would avoid having to poll, but it'd still allow the ap
Is it possible to create a trigger on sqlite_master which calls a
user-defined function AFTER INSERT?
That would avoid having to poll, but it'd still allow the application to be
notified when the schema changed.
On 19 June 2018 at 20:56, Richard Hipp wrote:
> On 6/19/18, Igor Korot wrote:
> >
Hi, guys,
On Tue, Jun 19, 2018 at 4:37 PM, Igor Korot wrote:
> Hi, Ryan,
>
> On Tue, Jun 19, 2018 at 3:22 PM, R Smith wrote:
>>
>> On 2018/06/19 8:26 PM, Igor Korot wrote:
>>>
>>> Hi,
>>> Is there a C API which checks if the new table has been created?
>>
>>
>> We could break this down into a
Hi, Ryan,
On Tue, Jun 19, 2018 at 3:22 PM, R Smith wrote:
>
> On 2018/06/19 8:26 PM, Igor Korot wrote:
>>
>> Hi,
>> Is there a C API which checks if the new table has been created?
>
>
> We could break this down into a few separate questions:
>
> 1 - Is there a C API that can return SQL query a
On 2018/06/19 8:26 PM, Igor Korot wrote:
Hi,
Is there a C API which checks if the new table has been created?
We could break this down into a few separate questions:
1 - Is there a C API that can return SQL query answers?
YES there is.
2 - Can I ask this API in SQL if the Schema changed, s
On 19 Jun 2018, at 7:56pm, Richard Hipp wrote:
> Poll the PRAGMA schema_version value and watch for changes.
This is the best way. (I'm hardly likely to argue with DRH, am I ?)
However, it's a terrible way to communicate using a database system. If you
want two connections to communicate h
afaik there is no such api.
You need to periodically check if something changed.
Run
pragma schema_version;
to get current schema version.
If it changes then run
select name from sqlite_master where type='table' and name not
like 'sqlite_%';
to get the list of table names and compare this
On 6/19/18, Igor Korot wrote:
> Hi, Wout,
>
> On Tue, Jun 19, 2018 at 1:31 PM, Wout Mertens
> wrote:
>> you can query the table with
>> https://www.sqlite.org/pragma.html#pragma_table_info
>
> Let me give you a scenario:
>
> 1. My application connects to the database and performs some
> operation
Hi, Wout,
On Tue, Jun 19, 2018 at 1:31 PM, Wout Mertens wrote:
> you can query the table with
> https://www.sqlite.org/pragma.html#pragma_table_info
Let me give you a scenario:
1. My application connects to the database and performs some
operations (using C API).
2. During the application run,
you can query the table with
https://www.sqlite.org/pragma.html#pragma_table_info
On Tue, Jun 19, 2018, 8:26 PM Igor Korot wrote:
> Hi,
> Is there a C API which checks if the new table has been created?
>
> Thank you.
> ___
> sqlite-users mailing list
Hi,
Is there a C API which checks if the new table has been created?
Thank you.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
25 matches
Mail list logo