congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.tmatesoft.sqljet.core.table
Code IndexAdd Tabnine to your IDE (free)

How to use org.tmatesoft.sqljet.core.table

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

origin: ha-jdbc/ha-jdbc

  @Override
  public void execute(SqlJetDb db) throws SqlJetException
  {
    db.getTable(INVOCATION_TABLE).insert(transactionId, phase, exceptionType);
  }
};
origin: org.tmatesoft.svnkit/svnkit

  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;
  }
});
origin: org.tmatesoft.sqljet/sqljet

public SqlJetScope reverse() {
  SqlJetScopeBound rightBound = getRightBound() != null ? new SqlJetScopeBound(getRightBound().getValue(), getRightBound().isInclusive()) : null;
  SqlJetScopeBound leftBound = getLeftBound() != null ? new SqlJetScopeBound(getLeftBound().getValue(), getLeftBound().isInclusive()) : null;
  return new SqlJetScope(rightBound, leftBound);
}

origin: org.tmatesoft.svnkit/svnkit

private boolean exists(SqlJetDb db, long wcId, String localRelPath) throws SqlJetException {
  ISqlJetTable table = db.getTable(SVNWCDbSchema.NODES.name());
  ISqlJetCursor cursor = table.lookup(null, wcId, localRelPath);
  try {
    return !cursor.eof();
  } finally {
    cursor.close();
  }
}
origin: ha-jdbc/ha-jdbc

  @Override
  public void execute(SqlJetDb db) throws SqlJetException
  {
    ISqlJetTable table = db.getTable(STATE_TABLE);
    table.clear();
    for (String database: databases)
    {
      table.insert(database);
    }
  }
};
origin: org.tmatesoft.sqljet/sqljet

public void delete() throws SqlJetException {
  if (!eof) {
    cursor.delete();
    eof = cursor.eof();
  }
}
origin: org.tmatesoft.sqljet/sqljet

public SqlJetValueType getFieldType(final String fieldName) throws SqlJetException {
  return (SqlJetValueType) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      return getBtreeDataTable().getFieldType(getFieldSafe(fieldName));
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public String getText(int columnIndex) throws SqlJetException {
  if (result instanceof String && columnIndex == 0) {
    return (String) result;
  }
  return cursor.getString(columnIndex);
}
origin: org.tmatesoft.sqljet/sqljet

public void close() throws SqlJetException {
  if (table != null) {
    table = null;
  }
  if (cursor != null) {
    cursor.close();
    cursor = null;
  }
}
origin: org.tmatesoft.sqljet/sqljet

public ISqlJetCursor open() throws SqlJetException {
  return (ISqlJetCursor) db.runWithLock(new ISqlJetRunnableWithLock() {
    public Object runWithLock(SqlJetDb db) throws SqlJetException {
      return new SqlJetTableDataCursor(new SqlJetBtreeDataTable(btree, tableName, write), db);
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public SqlJetValueType getColumnType(int columnIndex) throws SqlJetException {
  if (result instanceof String) {
    return SqlJetValueType.TEXT;
  }
  if (result instanceof Integer) {
    return SqlJetValueType.INTEGER;
  }
  if (result instanceof Double) {
    return SqlJetValueType.FLOAT;
  }
  return cursor.getFieldType(columnIndex);
}
origin: org.tmatesoft.svnkit/svnkit

  private boolean exists(SqlJetDb db, long wcId, String localRelPath) throws SqlJetException {
    ISqlJetTable table = db.getTable(SVNWCDbSchema.NODES.name());
    ISqlJetCursor cursor = table.lookup(null, wcId, localRelPath);
    try {
      return !cursor.eof();
    } finally {
      cursor.close();
    }
  }
}
origin: ha-jdbc/ha-jdbc

  @Override
  public void execute(SqlJetDb db) throws SqlJetException
  {
    db.getTable(INVOKER_TABLE).insert(transactionId, phase, databaseId);
  }
};
origin: org.tmatesoft.sqljet/sqljet

public byte[] getBlobAsArray(final String fieldName) throws SqlJetException {
  return (byte[]) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      ISqlJetMemoryPointer buffer = getBtreeDataTable().getBlob(getFieldSafe(fieldName));
      return buffer != null ? SqlJetUtility.readByteBuffer(buffer) : null;
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public Object getValue(final String fieldName) throws SqlJetException {
  return db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      if (SqlJetBtreeDataTable.isFieldNameRowId(fieldName)) {
        return getBtreeDataTable().getRowId();
      } else {
        return getBtreeDataTable().getValue(getFieldSafe(fieldName));
      }
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public int getFieldsCount() throws SqlJetException {
  return (Integer) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      return btreeTable.getFieldsCount();
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public long getInteger(final int field) throws SqlJetException {
  return (Long) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      return btreeTable.getInteger(field);
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public String getString(final String fieldName) throws SqlJetException {
  return (String) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      return getBtreeDataTable().getString(getFieldSafe(fieldName));
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public SqlJetValueType getFieldType(final int field) throws SqlJetException {
  return (SqlJetValueType) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      return btreeTable.getFieldType(field);
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public boolean getBoolean(final int field) throws SqlJetException {
  return (Boolean) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      return btreeTable.getInteger(field) != 0;
    }
  });
}
org.tmatesoft.sqljet.core.table

Most used classes

  • ISqlJetCursor
    This class represents table cursor that may be used to browse over records in the table, to modify o
  • ISqlJetTable
    Interface which represents database table.
  • SqlJetDb
    Connection to database. This class currently is main entry point in SQLJet API. It allows to perf
  • ISqlJetOptions
    Database options.
  • ISqlJetBusyHandler
    Busy handler interface. Busy handler are used to implement some behavior on database locking if d
  • ISqlJetTransaction,
  • SqlJetDefaultBusyHandler,
  • SqlJetScope$SqlJetScopeBound,
  • SqlJetScope,
  • ISqlJetEngineSynchronized,
  • ISqlJetEngineTransaction,
  • SqlJetEngine
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now