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

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

Best Java code snippets using org.tmatesoft.sqljet.core.table.SqlJetDb.runReadTransaction (Showing top 20 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 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;
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public InputStream getBlobAsStream(final String fieldName) throws SqlJetException {
  return (InputStream) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      ISqlJetMemoryPointer buffer = getBtreeDataTable().getBlob(getFieldSafe(fieldName));
      return buffer != null ? new ByteArrayInputStream(SqlJetUtility.readByteBuffer(buffer)) : null;
    }
  });
}
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 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 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 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 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 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 Object getValue(final int field) throws SqlJetException {
  return db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      Object value = btreeTable.getValue(field);
      if (value instanceof ISqlJetMemoryPointer) {
        return new ByteArrayInputStream(SqlJetUtility.readByteBuffer((ISqlJetMemoryPointer) value));
      }
      return value;
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

@Override
public boolean goTo(final long rowId) throws SqlJetException {
  return (Boolean) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      SqlJetIndexScopeCursor.super.goTo(rowId);
      return !eof();
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

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

public boolean goTo(final long rowId) throws SqlJetException {
  return (Boolean) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      final ISqlJetBtreeDataTable table = getBtreeDataTable();
      return table.goToRow(rowId);
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

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

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

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

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

public long getRowId() throws SqlJetException {
  return (Long) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      final ISqlJetBtreeDataTable table = getBtreeDataTable();
      if (table.eof()) {
        throw new SqlJetException(SqlJetErrorCode.MISUSE,
            "Table is empty or the current record doesn't point to a data row");
      }
      return table.getRowId();
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public InputStream getBlobAsStream(final int field) throws SqlJetException {
  return (InputStream) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      ISqlJetMemoryPointer buffer = btreeTable.getBlob(field);
      return buffer != null ? new ByteArrayInputStream(SqlJetUtility.readByteBuffer(buffer)) : null;
    }
  });
}
origin: org.tmatesoft.sqljet/sqljet

public Object[] getRowValues() throws SqlJetException {
  return (Object[]) db.runReadTransaction(new ISqlJetTransaction() {
    public Object run(SqlJetDb db) throws SqlJetException {
      Object[] values = getBtreeDataTable().getValues();
      return values.clone();
    }
  });
}
org.tmatesoft.sqljet.core.tableSqlJetDbrunReadTransaction

Javadoc

Run read-only transaction.

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
  • getSchema
    Get database schema.
  • dropIndex
    Drop index.
  • getSchema,
  • dropIndex,
  • dropTable,
  • getTemporaryDatabase,
  • isInTransaction,
  • isOpen,
  • rollback,
  • <init>,
  • alterTable

Popular in Java

  • Making http post requests using okhttp
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
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