IT. Expert System.

Android Reference

DatabaseUtils.InsertHelper


android.database

Class DatabaseUtils.InsertHelper

  • Enclosing class:
    DatabaseUtils

    Deprecated.
    Use SQLiteStatement instead.

    @Deprecated
    public static class DatabaseUtils.InsertHelper
    extends Object
    This class allows users to do multiple inserts into a table using the same statement.

    This class is not thread-safe.

    • Field Summary

      Fields
      Modifier and Type Field and Description
      static int TABLE_INFO_PRAGMA_COLUMNNAME_INDEX
      Deprecated.
      These are the columns returned by sqlite's "PRAGMA table_info(...)" command that we depend on.
      static int TABLE_INFO_PRAGMA_DEFAULT_INDEX
      Deprecated.
      This field was accidentally exposed in earlier versions of the platform so we can hide it but we can't remove it.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      void bind(int index, boolean value)
      Deprecated.
      Bind the value to an index.
      void bind(int index, byte[] value)
      Deprecated.
      Bind the value to an index.
      void bind(int index, double value)
      Deprecated.
      Bind the value to an index.
      void bind(int index, float value)
      Deprecated.
      Bind the value to an index.
      void bind(int index, int value)
      Deprecated.
      Bind the value to an index.
      void bind(int index, long value)
      Deprecated.
      Bind the value to an index.
      void bind(int index, String value)
      Deprecated.
      Bind the value to an index.
      void bindNull(int index)
      Deprecated.
      Bind null to an index.
      void close()
      Deprecated.
      Close this object and release any resources associated with it.
      long execute()
      Deprecated.
      Execute the previously prepared insert or replace using the bound values since the last call to prepareForInsert or prepareForReplace.
      int getColumnIndex(String key)
      Deprecated.
      Returns the index of the specified column.
      long insert(ContentValues values)
      Deprecated.
      Performs an insert, adding a new row with the given values.
      void prepareForInsert()
      Deprecated.
      Prepare the InsertHelper for an insert.
      void prepareForReplace()
      Deprecated.
      Prepare the InsertHelper for a replace.
      long replace(ContentValues values)
      Deprecated.
      Performs an insert, adding a new row with the given values.
    • Field Detail

      • TABLE_INFO_PRAGMA_COLUMNNAME_INDEX

        public static final int TABLE_INFO_PRAGMA_COLUMNNAME_INDEX
        Deprecated.
        These are the columns returned by sqlite's "PRAGMA table_info(...)" command that we depend on.
        See Also:
        Constant Field Values
      • TABLE_INFO_PRAGMA_DEFAULT_INDEX

        public static final int TABLE_INFO_PRAGMA_DEFAULT_INDEX
        Deprecated.
        This field was accidentally exposed in earlier versions of the platform so we can hide it but we can't remove it.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DatabaseUtils.InsertHelper

        public DatabaseUtils.InsertHelper(SQLiteDatabase db,
                                  String tableName)
        Deprecated.
        Parameters:
        db - the SQLiteDatabase to insert into
        tableName - the name of the table to insert into
    • Method Detail

      • getColumnIndex

        public int getColumnIndex(String key)
        Deprecated.
        Returns the index of the specified column. This is index is suitagble for use in calls to bind().
        Parameters:
        key - the column name
        Returns:
        the index of the column
      • bind

        public void bind(int index,
                double value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • bind

        public void bind(int index,
                float value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • bind

        public void bind(int index,
                long value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • bind

        public void bind(int index,
                int value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • bind

        public void bind(int index,
                boolean value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • bindNull

        public void bindNull(int index)
        Deprecated.
        Bind null to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
      • bind

        public void bind(int index,
                byte[] value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • bind

        public void bind(int index,
                String value)
        Deprecated.
        Bind the value to an index. A prepareForInsert() or prepareForReplace() without a matching execute() must have already have been called.
        Parameters:
        index - the index of the slot to which to bind
        value - the value to bind
      • insert

        public long insert(ContentValues values)
        Deprecated.
        Performs an insert, adding a new row with the given values. If the table contains conflicting rows, an error is returned.
        Parameters:
        values - the set of values with which to populate the new row
        Returns:
        the row ID of the newly inserted row, or -1 if an error occurred
      • execute

        public long execute()
        Deprecated.
        Execute the previously prepared insert or replace using the bound values since the last call to prepareForInsert or prepareForReplace.

        Note that calling bind() and then execute() is not thread-safe. The only thread-safe way to use this class is to call insert() or replace().

        Returns:
        the row ID of the newly inserted row, or -1 if an error occurred
      • prepareForInsert

        public void prepareForInsert()
        Deprecated.
        Prepare the InsertHelper for an insert. The pattern for this is:
        • prepareForInsert()
        • bind(index, value);
        • bind(index, value);
        • ...
        • bind(index, value);
        • execute();
      • prepareForReplace

        public void prepareForReplace()
        Deprecated.
        Prepare the InsertHelper for a replace. The pattern for this is:
        • prepareForReplace()
        • bind(index, value);
        • bind(index, value);
        • ...
        • bind(index, value);
        • execute();
      • replace

        public long replace(ContentValues values)
        Deprecated.
        Performs an insert, adding a new row with the given values. If the table contains conflicting rows, they are deleted and replaced with the new row.
        Parameters:
        values - the set of values with which to populate the new row
        Returns:
        the row ID of the newly inserted row, or -1 if an error occurred
      • close

        public void close()
        Deprecated.
        Close this object and release any resources associated with it. The behavior of calling insert() after calling this method is undefined.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 2428 / 96488227. Delta: 0.05141 с