Hi, Simon,

On Thu, Jul 5, 2018 at 11:45 AM, Simon Slavin <slav...@bigfraud.org> wrote:
> On 5 Jul 2018, at 4:51pm, Igor Korot <ikoro...@gmail.com> 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 
> about it.

Well, I can. I just have to do another check thru sqlite_master.
But I was hoping for an easier solution...

>
>> Or the only way is to query sqlite_master? But there is no guarantee
>> that the last record in that table with the "'table' || 'view'" condition 
>> willbe that one that was just created/altered.
>
> Correct.  It could be any row in that table.  And they might have DROPped a 
> table just as easily as CREATing a new one.

They might.
But I guess it is the limitation of the embedded database - not
everything can be done in a simple manner. ;-)

>
>> 2. During the application run, someone started sqlite3, connects to
>> the database and creates a
>> brand new table.
>> 3. My application will need to pick up the newly created table and continue.
>
> Why are people creating new tables in a database someone else created ?  
> That's not a common thing to do.  Normally people add records to existing 
> tables.  There are many ways to monitor adding records to an existing table.

Not necessary other people. I might as well open the shell and
create/drop a table.

Thank you.

>
> Simon.
> _______________________________________________
> 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

Reply via email to