Tabnine Logo
SQLiteStatement.bindNull
Code IndexAdd Tabnine to your IDE (free)

How to use
bindNull
method
in
android.database.sqlite.SQLiteStatement

Best Java code snippets using android.database.sqlite.SQLiteStatement.bindNull (Showing top 20 results out of 315)

origin: greenrobot/greenDAO

@Override
public void bindNull(int index) {
  delegate.bindNull(index);
}
origin: andpor/react-native-sqlite-storage

private void bindArgsToStatement(SQLiteStatement myStatement, ReadableArray sqlArgs) {
  for (int i = 0; i < sqlArgs.size(); i++) {
    ReadableType type = sqlArgs.getType(i);
    if (type == ReadableType.Number){
      double tmp = sqlArgs.getDouble(i);
      if (tmp == (long) tmp) {
        myStatement.bindLong(i + 1, (long) tmp);
      } else {
        myStatement.bindDouble(i + 1, tmp);
      }
    } else if (sqlArgs.isNull(i)) {
      myStatement.bindNull(i + 1);
    } else {
      myStatement.bindString(i + 1, SQLitePluginConverter.getString(sqlArgs,i,""));
    }
  }
}
origin: yahoo/squidb

@Override
public void bindNull(int index) {
  statement.bindNull(index);
}
origin: andpor/react-native-sqlite-storage

private void bindArgsToStatement(SQLiteStatement myStatement, ReadableArray sqlArgs) {
  if (sqlArgs == null)
    return;
  for (int i = 0; i < sqlArgs.size(); i++) {
    ReadableType type = sqlArgs.getType(i);
    if (type == ReadableType.Number) {
      double tmp = sqlArgs.getDouble(i);
      if (tmp == (long) tmp) {
        myStatement.bindLong(i + 1, (long) tmp);
      } else {
        myStatement.bindDouble(i + 1, tmp);
      }
    } else if (sqlArgs.isNull(i)) {
      myStatement.bindNull(i + 1);
    } else {
      myStatement.bindString(i + 1, sqlArgs.getString(i));
    }
  }
}
origin: westnordost/StreetComplete

@Override protected synchronized long executeInsert(OsmQuest quest, boolean replace)
{
  SQLiteStatement stmt = replace ? this.replace : this.add;
  if(quest.getId() != null)
  {
    stmt.bindLong(1, quest.getId());
  }
  else
  {
    stmt.bindNull(1);
  }
  stmt.bindString(2, quest.getType().getClass().getSimpleName());
  stmt.bindString(3, quest.getStatus().name());
  if(quest.getChanges() != null)
  {
    stmt.bindBlob(4, serializer.toBytes(quest.getChanges()));
  }
  else
  {
    stmt.bindNull(4);
  }
  if(quest.getChangesSource() != null) stmt.bindString(5, quest.getChangesSource());
  else                                 stmt.bindNull(5);
  stmt.bindLong(6, new Date().getTime());
  stmt.bindLong(7, quest.getElementId());
  stmt.bindString(8, quest.getElementType().name());
  long result = stmt.executeInsert();
  stmt.clearBindings();
  return result;
}
origin: westnordost/StreetComplete

private void executeInsert(Element.Type type, long id, ElementGeometry geometry)
{
  insert.bindString(1, type.name());
  insert.bindLong(2, id);
  if (geometry.polygons != null)
    insert.bindBlob(3, serializer.toBytes(geometry.polygons));
  else
    insert.bindNull(3);
  if (geometry.polylines != null)
    insert.bindBlob(4, serializer.toBytes(geometry.polylines));
  else
    insert.bindNull(4);
  insert.bindDouble(5, geometry.center.getLatitude());
  insert.bindDouble(6, geometry.center.getLongitude());
  insert.executeInsert();
  insert.clearBindings();
}
origin: westnordost/StreetComplete

@Override protected void executeInsert(Way way)
{
  insert.bindLong(1, way.getId());
  insert.bindLong(2, way.getVersion());
  insert.bindBlob(3, serializer.toBytes(new ArrayList<>(way.getNodeIds())));
  if(way.getTags() != null)
  {
    HashMap<String, String> map = new HashMap<>(way.getTags());
    insert.bindBlob(4, serializer.toBytes(map));
  }
  else
  {
    insert.bindNull(4);
  }
  insert.executeInsert();
  insert.clearBindings();
}
origin: westnordost/StreetComplete

@Override protected void executeInsert(Relation relation)
{
  insert.bindLong(1, relation.getId());
  insert.bindLong(2, relation.getVersion());
  insert.bindBlob(3, serializer.toBytes(new ArrayList<>(relation.getMembers())));
  if(relation.getTags() != null)
  {
    HashMap<String, String> map = new HashMap<>(relation.getTags());
    insert.bindBlob(4, serializer.toBytes(map));
  }
  else
  {
    insert.bindNull(4);
  }
  insert.executeInsert();
  insert.clearBindings();
}
origin: westnordost/StreetComplete

private void executeInsert(Note note)
{
  insert.bindLong(1, note.id);
  insert.bindDouble(2, note.position.getLatitude());
  insert.bindDouble(3, note.position.getLongitude());
  insert.bindString(4, note.status.name());
  insert.bindLong(5, note.dateCreated.getTime());
  if(note.dateClosed != null)
  {
    insert.bindLong(6, note.dateClosed.getTime());
  }
  else
  {
    insert.bindNull(6);
  }
  insert.bindBlob(7, serializer.toBytes(note.comments));
  insert.executeInsert();
  insert.clearBindings();
}
origin: westnordost/StreetComplete

@Override protected synchronized long executeInsert(OsmNoteQuest quest, boolean replace)
{
  SQLiteStatement stmt = replace ? this.replace : this.add;
  if(quest.getId() != null)
  {
    stmt.bindLong(1, quest.getId());
  }
  else
  {
    stmt.bindNull(1);
  }
  stmt.bindLong(2, quest.getNote().id);
  stmt.bindString(3, quest.getStatus().name());
  if(quest.getComment() != null)
  {
    stmt.bindString(4, quest.getComment());
  }
  else
  {
    stmt.bindNull(4);
  }
  stmt.bindLong(5, quest.getLastUpdate().getTime());
  long result = stmt.executeInsert();
  stmt.clearBindings();
  return result;
}
origin: com.abubusoft/kripton-orm

/**
 * Adds a null value to the set.
 */
public void putNull() {
  compiledStatement.bindNull(compiledStatementBindIndex++);
}
// ---
origin: xcesco/kripton

/**
 * Adds a null value to the set.
 */
public void putNull() {
  compiledStatement.bindNull(compiledStatementBindIndex++);
}
// ---
origin: westnordost/StreetComplete

@Override protected void executeInsert(Node node)
{
  insert.bindLong(1, node.getId());
  insert.bindLong(2, node.getVersion());
  insert.bindDouble(3, node.getPosition().getLatitude());
  insert.bindDouble(4, node.getPosition().getLongitude());
  if(node.getTags() != null)
  {
    HashMap<String, String> map = new HashMap<>(node.getTags());
    insert.bindBlob(5, serializer.toBytes(map));
  }
  else
  {
    insert.bindNull(5);
  }
  insert.executeInsert();
  insert.clearBindings();
}
origin: com.abubusoft/kripton-orm

/**
 * Adds a value to the set.
 *
 * @param value            the data for the value to put
 */
public void put(Integer value) {
  if (value == null) {
    this.compiledStatement.bindNull(compiledStatementBindIndex++);
  } else {
    compiledStatement.bindLong(compiledStatementBindIndex++, value);
  }
}
origin: com.abubusoft/kripton-orm

/**
 * Adds a value to the set.
 *
 * @param value            the data for the value to put
 */
public void put(byte[] value) {
  if (value == null) {
    this.compiledStatement.bindNull(compiledStatementBindIndex++);
  } else {
    compiledStatement.bindBlob(compiledStatementBindIndex++, value);
  }
}
origin: com.abubusoft/kripton-orm

/**
 * Adds a value to the set.
 *
 * @param value            the data for the value to put
 */
public void put(Long value) {
  if (value == null) {
    this.compiledStatement.bindNull(compiledStatementBindIndex++);
  } else {
    compiledStatement.bindLong(compiledStatementBindIndex++, (long) value);
  }
}
origin: adolfAn/FBReader_AS

public static void bindDate(SQLiteStatement statement, int index, Date value) {
  if (value != null) {
    statement.bindLong(index, value.getTime());
  } else {
    statement.bindNull(index);
  }
}
origin: adolfAn/FBReader_AS

public static void bindLong(SQLiteStatement statement, int index, Long value) {
  if (value != null) {
    statement.bindLong(index, value);
  } else {
    statement.bindNull(index);
  }
}
origin: com.abubusoft/kripton-orm

/**
 * Adds a value to the set.
 *
 * @param value            the data for the value to put
 */
public void put(String value) {
  if (value == null) {
    this.compiledStatement.bindNull(compiledStatementBindIndex++);
  } else {
    compiledStatement.bindString(compiledStatementBindIndex++, value);
  }
}
origin: xcesco/kripton

/**
 * Adds a value to the set.
 *
 * @param value            the data for the value to put
 */
public void put(Float value) {
  if (value == null) {
    this.compiledStatement.bindNull(compiledStatementBindIndex++);
  } else {
    compiledStatement.bindDouble(compiledStatementBindIndex++, (float) value);
  }
}
android.database.sqliteSQLiteStatementbindNull

Popular methods of SQLiteStatement

  • bindLong
  • bindString
  • clearBindings
  • executeInsert
  • close
  • execute
  • bindDouble
  • bindBlob
  • executeUpdateDelete
  • simpleQueryForLong
  • simpleQueryForString
  • bindAllArgsAsStrings
  • simpleQueryForString,
  • bindAllArgsAsStrings,
  • bindDate,
  • bindInt,
  • bindInteger,
  • bindValue,
  • simpleQueryForBlobFileDescriptor,
  • toString

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • getContentResolver (Context)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Collectors (java.util.stream)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top PhpStorm plugins
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