Did I find the right examples for you? yes no

All Samples(17)  |  Call(9)  |  Derive(0)  |  Import(8)

        def optimize_connection(cur, wal_journal=False, synchronous_off=False, exclusive_lock=True):
    cur.execute("PRAGMA cache_size = 40000")
    cur.execute("PRAGMA temp_store = memory")

    if wal_journal:
        cur.execute("PRAGMA journal_mode = WAL")
    else:
        try:
            cur.execute("PRAGMA journal_mode = DELETE")
        except sqlite3.OperationalError:
            pass

    if exclusive_lock:
        cur.execute("PRAGMA locking_mode = EXCLUSIVE")

    if synchronous_off:
        cur.execute("PRAGMA synchronous = OFF")
        


src/u/m/umimbutil-0.1.0/mbutil/util_import.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile
 
from util import mbtiles_connect, mbtiles_setup, optimize_connection, optimize_database, execute_commands_on_tile, flip_y, compaction_update
 
logger = logging.getLogger(__name__)
    con = mbtiles_connect(mbtiles_file, auto_commit)
    cur = con.cursor()
    optimize_connection(cur, wal_journal, synchronous_off, False)
 
 

src/u/m/umimbutil-0.1.0/mbutil/util_merge.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile, multiprocessing
 
from util import mbtiles_connect, mbtiles_setup, compaction_update, optimize_connection, optimize_database, execute_commands_on_tile, process_tile, flip_y
from util_check import check_mbtiles
from multiprocessing import Pool
    con1 = mbtiles_connect(mbtiles_file1, auto_commit)
    cur1 = con1.cursor()
    optimize_connection(cur1, wal_journal, synchronous_off, False)
 
    con2 = mbtiles_connect(mbtiles_file2)
    cur2 = con2.cursor()
    optimize_connection(cur2)

src/u/m/umimbutil-0.1.0/mbutil/util_compact.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile
 
logger = logging.getLogger(__name__)
 
from util import mbtiles_connect, optimize_connection, optimize_database, execute_commands_on_tile, compaction_prepare, compaction_finalize
    con = mbtiles_connect(mbtiles_file)
    cur = con.cursor()
    optimize_connection(cur, wal_journal, synchronous_off)
 
    existing_mbtiles_is_compacted = (con.execute("SELECT count(name) FROM sqlite_master WHERE type='table' AND name='images'").fetchone()[0] > 0)

src/u/m/umimbutil-0.1.0/mbutil/util_process.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile, multiprocessing
 
from util import mbtiles_connect, mbtiles_setup, compaction_update, optimize_connection, optimize_database, process_tile
from multiprocessing import Pool
 
    con = mbtiles_connect(mbtiles_file, auto_commit)
    cur = con.cursor()
    optimize_connection(cur, wal_journal, synchronous_off)
 
 

src/u/m/umimbutil-0.1.0/mbutil/util_export.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile
 
from util import mbtiles_connect, optimize_connection, optimize_database, compaction_update, execute_commands_on_tile, flip_y
 
logger = logging.getLogger(__name__)
    con = mbtiles_connect(mbtiles_file)
    cur = con.cursor()
    optimize_connection(cur, wal_journal)
 
 

src/u/m/umimbutil-0.1.0/mbutil/util_check.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile
 
from util import mbtiles_connect, optimize_connection, optimize_database, execute_commands_on_tile
 
logger = logging.getLogger(__name__)
    con = mbtiles_connect(mbtiles_file)
    cur = con.cursor()
    optimize_connection(cur)
 
    logger.debug("Loading zoom levels")

src/u/m/umimbutil-0.1.0/mbutil/util_fill.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile
 
from util import mbtiles_connect, optimize_connection, optimize_database, coordinate_to_tile
 
logger = logging.getLogger(__name__)
    con = mbtiles_connect(mbtiles_file)
    cur = con.cursor()
    optimize_connection(cur)
 
 

src/u/m/umimbutil-0.1.0/mbutil/util_test.py   umimbutil(Download)
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile, multiprocessing
 
from util import mbtiles_connect, optimize_connection, optimize_database
from multiprocessing import Pool
 
    con = mbtiles_connect(mbtiles_file)
    cur = con.cursor()
    optimize_connection(cur)
 
    zoom_levels = [int(x[0]) for x in cur.execute("SELECT distinct(zoom_level) FROM tiles").fetchall()]