I'd like to write a script that creates an in-memory SQLite database via SQLAlchemy, but when I've finished with it I'd like to upload it as a file to a server, preferably without ever creating a temporary file on the client side. Is this possible?
Cheers,
Demitri
> --
> You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
> To post to this group, send email to sqlal...@googlegroups.com.
> To unsubscribe from this group, send email to sqlalchemy+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
>
> Hi,
>
> I'd like to write a script that creates an in-memory SQLite database via SQLAlchemy, but when I've finished with it I'd like to upload it as a file to a server, preferably without ever creating a temporary file on the client side. Is this possible?
It is possible but potentially difficult. You could accomplish this by using the backup facility (sqlite3_backup_*) to push the in-memory database to the remote location, perhaps over a network-mounted file share. (http://www.sqlite.org/backup.html)
It would likely be easier to use iterdump in pysqlite to generate a database dump and push the SQL dump text to a server.
If you are trying to avoid hitting the disk, perhaps you can create the sqlite db on an in-memory filesystem. Then you could use normal filesystem operations to manipulate the resultant database.
In any case, SQLAlchemy won't be directly helpful here.
Cheers,
M
Cheers,
Demitri