congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
SQLiteStatement.bindDouble
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: greenrobot/greenDAO

@Override
public void bindDouble(int index, double value) {
  delegate.bindDouble(index, value);
}
origin: stackoverflow.com

 private void insertTestData() {
  String sql = "insert into producttable (name, description, price, stock_available) values (?, ?, ?, ?);";

  dbHandler.getWritableDatabase();
  database.beginTransaction();
  SQLiteStatement stmt = database.compileStatement(sql);

  for (int i = 0; i < NUMBER_OF_ROWS; i++) {
    //generate some values

    stmt.bindString(1, randomName);
    stmt.bindString(2, randomDescription);
    stmt.bindDouble(3, randomPrice);
    stmt.bindLong(4, randomNumber);

    long entryID = stmt.executeInsert();
    stmt.clearBindings();
  }

  database.setTransactionSuccessful();
  database.endTransaction();

  dbHandler.close();
}
origin: greenrobot/greenDAO

@Override
protected final void bindValues(SQLiteStatement stmt, SimpleEntityNotNull entity) {
  stmt.clearBindings();
  stmt.bindLong(1, entity.getId());
  stmt.bindLong(2, entity.getSimpleBoolean() ? 1L: 0L);
  stmt.bindLong(3, entity.getSimpleByte());
  stmt.bindLong(4, entity.getSimpleShort());
  stmt.bindLong(5, entity.getSimpleInt());
  stmt.bindLong(6, entity.getSimpleLong());
  stmt.bindDouble(7, entity.getSimpleFloat());
  stmt.bindDouble(8, entity.getSimpleDouble());
  stmt.bindString(9, entity.getSimpleString());
  stmt.bindBlob(10, entity.getSimpleByteArray());
}
origin: yahoo/squidb

@Override
public void bindDouble(int index, double value) {
  statement.bindDouble(index, value);
}
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: 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: greenrobot/greenDAO

stmt.bindDouble(7, simpleFloat);
stmt.bindDouble(8, simpleDouble);
origin: seven332/EhViewer

  stmt.bindString(8, uploader);
stmt.bindDouble(9, entity.getRating());
origin: seven332/EhViewer

  stmt.bindString(8, uploader);
stmt.bindDouble(9, entity.getRating());
origin: seven332/EhViewer

  stmt.bindString(8, uploader);
stmt.bindDouble(9, entity.getRating());
origin: seven332/EhViewer

  stmt.bindString(8, uploader);
stmt.bindDouble(9, entity.getRating());
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 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: 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: maskarade/Android-Orma

@Override
public void bindDouble(int index, double value) {
  statement.bindDouble(index, value);
}
origin: westnordost/StreetComplete

@Override protected long executeInsert(Quest quest, boolean replace)
{
  String orWhat = replace ? "REPLACE" : "IGNORE";
  SQLiteDatabase db = dbHelper.getWritableDatabase();
  SQLiteStatement insert = db.compileStatement(
      "INSERT OR "+orWhat+" INTO " + TABLE_NAME +
          "("+ID_COL+","+QS_COL+","+LAT_COL+","+LON_COL+","+LAST_UPDATE_COL+
          ") VALUES (?,?,?,?,?)");
  insert.bindLong(1, quest.getId());
  insert.bindString(2, quest.getStatus().name());
  insert.bindDouble(3, quest.getCenter().getLatitude());
  insert.bindDouble(4, quest.getCenter().getLongitude());
  insert.bindDouble(5, quest.getLastUpdate().getTime());
  return insert.executeInsert();
}
origin: com.abubusoft/kripton-orm

/**
 * 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);
  }
}
origin: com.abubusoft/kripton-orm

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

/**
 * Adds a value to the set.
 *
 * @param value            the data for the value to put
 */
public void put(Double value) {
  if (value == null) {
    this.compiledStatement.bindNull(compiledStatementBindIndex++);
  } else {
    this.compiledStatement.bindDouble(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.sqliteSQLiteStatementbindDouble

Popular methods of SQLiteStatement

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

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Notification (javax.management)
  • Reference (javax.naming)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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