Hi, I am new to web2py and am an amateur programmer.
I have working python script with APSW imported. 
(http://rogerbinns.github.io/apsw/)

I wanted to make use of the same script in web2py.
But I guess I cannot import it in the module. (apsw works with 2.x version 
of python as well though)
Wanted to check if it is possible to import it ?

The feature that I want is to be able to create a Table in the memory.
Once things are imported to it, dump it to the disk as a .sqlite file.
We can read that .sqlite file from the disk and put it memory as well if 
needed.
It is a log analysis application, so each log would have db file which can 
be re-read later.
The table is going to be static, so there will not be any modifications to 
it once data is inserted.
It mostly will be queries to the table and if the table is in memory, 
things will be much faster.

    mem_db_connection = apsw.Connection(":memory:")
    cursor = mem_db_connection.cursor()
    global_db_backup_con = apsw.Connection(db_file_name)
    ....
    # Copy from memory to disk
    with global_db_backup_con.backup("main", mem_db_connection, "main") as 
backup:
        backup.step()   # copy whole database in one go

Its is a simple application, which would run on local host and the table 
size would be small.
Wanted to check if something on those lines is possible.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to