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

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • JFileChooser (javax.swing)
  • Top Sublime Text 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