Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-06-16 Thread big stone
Hi Roger, Why is APSW not findable on the Pypi infrastructure ? It should be the place where a newcomer would look for it. I just published my work as "sqlite_bro" (pip install sqlite_bro), and it doesn't seem to be too complex. (just one full day lost to figure it out, in my case) Regards

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-06-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/06/14 14:15, big stone wrote: > No doubt that ASPW is much much better than SQLite3 standard library > module. Just wanted to make sure you knew :-) Also you are welcome (and encouraged) to appropriate whatever pieces of APSW code would be

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-06-01 Thread big stone
Hi Roger, No doubt that ASPW is much much better than SQLite3 standard library module. Unfortunately, many People won't install ASPW because : - Python "out of the box" SQLite experience has been complex for them (newcomers in Python), - no small utility was there to keep their SQLite interest

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-06-01 Thread Roger Binns
On 06/01/2014 07:30 AM, big stone wrote: There is indeed an iterdump function in sqlite3 module, that I didn't notice. The one in APSW is far more thorough. If you just have some regular data tables then it won't make any difference. However if you are about correctness then be wary of the

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-06-01 Thread big stone
Hi Domingo, You were right ! There is indeed an iterdump function in sqlite3 module, that I didn't notice. Many thanks, I just needed to : - wrap it around "PRAGMA foreign_keys = OFF;" and "PRAGMA foreign_keys = ON;" - then understand the "transaction" strange default settings of SQlite3. For

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread E.Pasma
Op 29 mei 2014, om 15:38 heeft Domingo Alvarez Duarte het volgende geschreven: On Thu, May 29, 2014 at 2:25 PM, E.Pasma wrote: Op 29 mei 2014, om 11:59 heeft big stone het volgende geschreven: Hello, I would like to save my sqlite ':memory:' database into a sql

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread big stone
Hi Domingo, I don't know what this API is and if it's usable from standard Python. As I wanted also to backup my internal Python Procedures, I just finished my first attempt. I don't know if I did it in the right order. ==> Casual testers are welcome. screenshot

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread Domingo Alvarez Duarte
I'm seeing this thread for a while and don't remember anyone mentioning the sqlite3_backup_* api functions, isn't that what are you looking for ? Cheers ! On Thu, May 29, 2014 at 2:25 PM, E.Pasma wrote: > Op 29 mei 2014, om 11:59 heeft big stone het volgende geschreven: >

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread E.Pasma
Op 29 mei 2014, om 11:59 heeft big stone het volgende geschreven: Hello, I would like to save my sqlite ':memory:' database into a sql command text file. With sqlite.dll, what is the procedure/algorithm ? Is it already explained somewhere on Internet ? At first look, I may imagine that I

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread big stone
Hi Simon, For structure, all is in "select sql from master_sqlite", the big subtility is to play them in a pertinent order. For the data themselves, it is already done in the source sqlite.exe for the ".dump" function, so I have just to digg . Apparently , it's in shell.c around line 1275 .

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread Stephen Chrzanowski
I agree with Simon, there is no direct way to export your data as SQL commands. But there are a few things you can do; 1> Code it out yourself, but you'll need to be aware of how you're dealing with the order you need 2> As you're making changes to the database, write out the

Re: [sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread Simon Slavin
On 29 May 2014, at 10:59am, big stone wrote: > I would like to save my sqlite ':memory:' database into a sql command text > file. There are no functions built into SQLite which turn schema or data into SQL commands. The Shell Tool can do it, but the code which does it

[sqlite] Creating a 'SQL text' Backup of a SQlite database with the mere sqlite.dll tool (and a Python 3)

2014-05-29 Thread big stone
Hello, I would like to save my sqlite ':memory:' database into a sql command text file. With sqlite.dll, what is the procedure/algorithm ? Is it already explained somewhere on Internet ? At first look, I may imagine that I need to : - create tables in a certain order (keeping the comments for