Codota Logo
SqlJetDb.getSchema
Code IndexAdd Codota to your IDE (free)

How to use
getSchema
method
in
org.tmatesoft.sqljet.core.table.SqlJetDb

Best Java code snippets using org.tmatesoft.sqljet.core.table.SqlJetDb.getSchema (Showing top 12 results out of 315)

  • Common ways to obtain SqlJetDb
private void myMethod () {
SqlJetDb s =
  • Codota IconFile file;SqlJetDb.open(file, true)
  • Codota IconFSFS fSFS;SqlJetDb.open(fSFS.getRepositoryCacheFile(), true)
  • Smart code suggestions by Codota
}
origin: org.tmatesoft.sqljet/sqljet

  public ISqlJetSchema getSchema(String databaseName) throws SqlJetException {
    return db.getSchema();
  }
}
origin: org.tmatesoft.svnkit/svnkit

public boolean hasTable(String tableName) throws SVNException {
  try {
    return tableName != null && db.getSchema().getTableNames().contains(tableName);
  } catch (SqlJetException e) {
    SVNErrorMessage err1 = SVNErrorMessage.create(SVNErrorCode.SQLITE_ERROR, e);
    SVNErrorManager.error(err1, SVNLogType.DEFAULT);
  }
  return false;
}
origin: ha-jdbc/ha-jdbc

  @Override
  public void execute(SqlJetDb database) throws SqlJetException
  {
    ISqlJetSchema schema = database.getSchema();
    if (schema.getTable(STATE_TABLE) == null)
    {
      database.createTable(CREATE_STATE_SQL);
    }
    else if (Boolean.getBoolean(StateManager.CLEAR_LOCAL_STATE))
    {
      database.getTable(STATE_TABLE).clear();
    }
  }
};
origin: ha-jdbc/ha-jdbc

  @Override
  public void execute(SqlJetDb database) throws SqlJetException
  {
    ISqlJetSchema schema = database.getSchema();
    if (schema.getTable(INVOCATION_TABLE) == null)
    {
      database.createTable(CREATE_INVOCATION_SQL);
    }
    if (schema.getTable(INVOKER_TABLE) == null)
    {
      database.createTable(CREATE_INVOKER_SQL);
      database.createIndex(CREATE_INVOKER_INDEX);
    }
  }
};
origin: org.tmatesoft.sqljet/sqljet

private void handleDropIndex() throws SqlJetException {
  CommonTree options = (CommonTree) ast.getChild(0);
  boolean ifExists = options.getChildCount() > 0 && "exists".equalsIgnoreCase(options.getChild(0).getText());
  String indexName = ast.getChild(1).getText();
  if (db.getSchema().getIndex(indexName) != null) {
    db.dropIndex(indexName);
  } else if (!ifExists) {
    throw new SqlJetException(SqlJetErrorCode.ERROR, "Index does not exists.");
  }
}
origin: org.tmatesoft.sqljet/sqljet

private void handleDropTable() throws SqlJetException {
  CommonTree options = (CommonTree) ast.getChild(0);
  boolean ifExists = options.getChildCount() > 0 && "exists".equalsIgnoreCase(options.getChild(0).getText());
  String tableName = ast.getChild(1).getText();
  if (db.getSchema().getTable(tableName) != null) {
    db.dropTable(tableName);
  } else if (!ifExists) {
    throw new SqlJetException(SqlJetErrorCode.ERROR, "Table does not exists.");
  }
}
origin: org.tmatesoft.svnkit/svnkit

  public void bumpTo(SVNWCDb db, SVNSqlJetDb sDb, File wcRootAbsPath) throws SVNException {
    /*-- STMT_UPGRADE_TO_26
    * DROP VIEW IF EXISTS NODES_BASE;
    * CREATE VIEW NODES_BASE AS
    * SELECT * FROM nodes
    *  WHERE op_depth = 0;
    */
    
    try {
      if (sDb.getDb().getSchema().getViewNames().contains("NODES_BASE")) {
        sDb.getDb().dropView("NODES_BASE");
      }
      sDb.getDb().createView("CREATE VIEW NODES_BASE AS SELECT * FROM nodes WHERE op_depth = 0;"); 
    } catch (SqlJetException e) {
      SVNSqlJetDb.createSqlJetError(e);
    }
    
    setVersion(sDb, (int)26);
  }
}
origin: org.tmatesoft.svnkit/svnkit

private void ensureNodesMovedToIndex(SVNSqlJetDb sDb) throws SVNException {
  try {
    sDb.beginTransaction(SqlJetTransactionMode.WRITE);
    if (sDb.getDb().getSchema().getIndex("I_NODES_MOVED") == null) {
      sDb.getDb().createIndex("CREATE UNIQUE INDEX I_NODES_MOVED ON NODES (wc_id, moved_to, op_depth);");
    }
    sDb.commit();
  } catch (SqlJetException e) {
    sDb.rollback();
    SVNSqlJetDb.createSqlJetError(e);
  }
  
}
origin: org.tmatesoft.svnkit/svnkit

case TABLE:                                
  if (stmt.isDrop()) {
    if (db.getSchema().getTableNames().contains(stmt.getName())) {
      db.dropTable(stmt.getSql());
      if (db.getSchema().getTableNames().contains(stmt.getName())) {
        db.dropTable(stmt.getName());
case INDEX:
  if (stmt.isDrop()) {
    if (db.getSchema().getIndexNames().contains(stmt.getName())) {
      db.dropIndex(stmt.getSql());
      if (db.getSchema().getIndexNames().contains(stmt.getName())) {
        db.dropIndex(stmt.getName());
case VIEW:
  if (stmt.isDrop()) {
    if (db.getSchema().getViewNames().contains(stmt.getName())) {
      db.dropView(stmt.getSql());
      if (db.getSchema().getViewNames().contains(stmt.getName())) {
        db.dropView(stmt.getName());
case TRIGGER:
  if (stmt.isDrop()) {
    if (db.getSchema().getTriggerNames().contains(stmt.getName())) {
      db.dropTrigger(stmt.getSql());
origin: org.tmatesoft.svnkit/svnkit

if (sDb.getDb().getSchema().getTriggerNames().contains("nodes_update_checksum_trigger")) {
  sDb.getDb().dropTrigger("nodes_update_checksum_trigger");
if (sDb.getDb().getSchema().getTriggerNames().contains("nodes_insert_trigger")) {
  sDb.getDb().dropTrigger("nodes_insert_trigger");
if (sDb.getDb().getSchema().getTriggerNames().contains("nodes_delete_trigger")) {
  sDb.getDb().dropTrigger("nodes_delete_trigger");
origin: org.tmatesoft.svnkit/svnkit

public void bumpTo(SVNWCDb db, SVNSqlJetDb sDb, File wcRootAbsPath) throws SVNException {
  try {
    if (sDb.getDb().getSchema().getTable("NODES").getColumn("inherited_props") == null) {
      sDb.getDb().createIndex("CREATE UNIQUE INDEX IF NOT EXISTS I_NODES_MOVED ON NODES (wc_id, moved_to, op_depth);");
      sDb.getDb().createIndex("CREATE INDEX IF NOT EXISTS I_PRISTINE_MD5 ON PRISTINE (md5_checksum);");
origin: org.tmatesoft.svnkit/svnkit

public void bumpTo(SVNWCDb db, SVNSqlJetDb sDb, File wcRootAbsPath) throws SVNException {
  try {
    if (sDb.getDb().getSchema().getTable("NODES").getColumn("inherited_props") != null) {
      setVersion(sDb, 31);
      return;
    } else {    
      if (sDb.getDb().getSchema().getIndex("I_ACTUAL_CHANGELIST") != null) {
        sDb.getDb().dropIndex("I_ACTUAL_CHANGELIST");
      if (sDb.getDb().getSchema().getIndex("I_EXTERNALS_PARENT") != null) {
        sDb.getDb().dropIndex("I_EXTERNALS_PARENT");
org.tmatesoft.sqljet.core.tableSqlJetDbgetSchema

Javadoc

Get database schema.

Popular methods of SqlJetDb

  • getTable
    Open table.
  • open
  • close
  • getOptions
  • createIndex
    Create index from SQL clause.
  • createTable
    Create table from SQL clause.
  • runWithLock
    Do some actions with locking database's internal threads synchronization mutex. It is related only w
  • runWriteTransaction
    Run modifications in write transaction.
  • beginTransaction
  • commit
  • runReadTransaction
    Run read-only transaction.
  • dropIndex
    Drop index.
  • runReadTransaction,
  • dropIndex,
  • dropTable,
  • getTemporaryDatabase,
  • isInTransaction,
  • isOpen,
  • rollback,
  • <init>,
  • alterTable

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • startActivity (Activity)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now