/** * {@inheritDoc} * @see net.sf.hajdbc.pool.PoolProvider#create() */ @Override public synchronized SqlJetDb create() throws SqlJetException { boolean exists = this.file.exists(); SqlJetDb db = SqlJetDb.open(this.file, true); if (!exists) { db.getOptions().setAutovacuum(true); db.getOptions().setIncrementalVacuum(true); } return db; }
public Object runWithLock(SqlJetDb db) throws SqlJetException { return new SqlJetPragmasHandler(getOptions()).pragma(sql); } });
public Object runWithLock(SqlJetDb db) throws SqlJetException { int version = db.getOptions().getUserVersion(); if (version < REP_CACHE_DB_FORMAT) { db.getOptions().setAutovacuum(true); db.runWriteTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { db.getOptions().setUserVersion(REP_CACHE_DB_FORMAT); db.createTable(FSRepresentationCacheManager.REP_CACHE_DB_SQL); return null; } }); } else if (version > REP_CACHE_DB_FORMAT) { throw new SqlJetException("Schema format " + version + " not recognized"); } return null; } });
public Object runWithLock(SqlJetDb db) throws SqlJetException { int version = db.getOptions().getUserVersion(); if (version < REP_CACHE_DB_FORMAT) { db.getOptions().setAutovacuum(true); db.runWriteTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { db.getOptions().setUserVersion(REP_CACHE_DB_FORMAT); db.createTable(FSRepresentationCacheManager.REP_CACHE_DB_SQL); return null; } }); } else if (version > REP_CACHE_DB_FORMAT) { throw new SqlJetException("Schema format " + version + " not recognized"); } return null; } });
public Object runWithLock(SqlJetDb db) throws SqlJetException { int version = db.getOptions().getUserVersion(); if (version < REP_CACHE_DB_FORMAT) { db.getOptions().setAutovacuum(true); db.runWriteTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { db.getOptions().setUserVersion(REP_CACHE_DB_FORMAT); db.createTable(FSRepresentationCacheManager.REP_CACHE_DB_SQL); return null; } }); } else if (version > REP_CACHE_DB_FORMAT) { throw new SqlJetException("Schema format " + version + " not recognized"); } return null; } });
public Object run(SqlJetDb db) throws SqlJetException { db.createTable("create table revprop (revision integer UNIQUE not null, " + "properties BLOB not null);"); db.createIndex("create index i_revision on revprop (revision);"); db.getOptions().setUserVersion(1); return null; } });
handleDropIndex(); } else if ("pragma".equalsIgnoreCase(stmtName)) { result = new SqlJetPragmasHandler(db.getOptions()).pragma(ast); return result != null; } else {
public long exec() throws SVNException { try { sDb.getDb().getOptions().setAutovacuum(true); sDb.getDb().runWriteTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { db.createTable("create table revprop (revision integer UNIQUE not null, " + "properties BLOB not null);"); db.createIndex("create index i_revision on revprop (revision);"); db.getOptions().setUserVersion(1); return null; } }); } catch (SqlJetException e) { SVNErrorMessage err = SVNErrorMessage.create( SVNErrorCode.SQLITE_ERROR,e); SVNErrorManager.error(err, SVNLogType.FSFS); } return 0; }
db.getOptions().setUserVersion(userVersion);
public SVNWCDbRoot(SVNWCDb db, File absPath, SVNSqlJetDb sDb, long wcId, int format, boolean autoUpgrade, boolean failOnVersionsMismatch, boolean enforceEmptyWQ) throws SVNException { if (sDb != null) { try { format = sDb.getDb().getOptions().getUserVersion(); } catch (SqlJetException e) { if (e.getErrorCode() == SqlJetErrorCode.NOTADB) {
childItem.opRoot = opDepth == SVNWCUtils.relpathDepth(childRelPath); childItem.format = db.getDb().getOptions().getUserVersion(); nodes.put(name, childItem);