DatabaseUtils Class

Definition

Static utility methods for dealing with databases and Cursors.

[Android.Runtime.Register("android/database/DatabaseUtils", DoNotGenerateAcw=true)]
public class DatabaseUtils : Java.Lang.Object
[<Android.Runtime.Register("android/database/DatabaseUtils", DoNotGenerateAcw=true)>]
type DatabaseUtils = class
    inherit Object
Inheritance
DatabaseUtils
Attributes

Remarks

Static utility methods for dealing with databases and Cursors.

Java documentation for android.database.DatabaseUtils.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

DatabaseUtils()
DatabaseUtils(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Methods

AppendEscapedSQLString(StringBuilder, String)

Appends an SQL string to the given StringBuilder, including the opening and closing single quotes.

AppendSelectionArgs(String[], String[])

Appends one set of selection args to another.

AppendValueToSql(StringBuilder, Object)

Appends an Object to an SQL string with the proper escaping, etc.

BindObjectToProgram(SQLiteProgram, Int32, Object)

Binds the given Object to the given SQLiteProgram using the proper typing.

BlobFileDescriptorForQuery(SQLiteDatabase, String, String[])

Utility method to run the query on the db and return the blob value in the first column of the first row.

BlobFileDescriptorForQuery(SQLiteStatement, String[])

Utility method to run the pre-compiled query and return the blob value in the first column of the first row.

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
ConcatenateWhere(String, String)

Concatenates two SQL WHERE clauses, handling empty or null values.

CreateDbFromSqlStatements(Context, String, Int32, String)

Creates a db and populates it with the sql statements in sqlStatements.

CursorDoubleToContentValues(ICursor, String, ContentValues, String)

Reads a Double out of a field in a Cursor and writes it to a Map.

CursorDoubleToContentValuesIfPresent(ICursor, ContentValues, String)

Reads a Double out of a column in a Cursor and writes it to a ContentValues.

CursorDoubleToCursorValues(ICursor, String, ContentValues)

Reads a Double out of a field in a Cursor and writes it to a Map.

CursorFloatToContentValuesIfPresent(ICursor, ContentValues, String)

Reads a Float out of a column in a Cursor and writes it to a ContentValues.

CursorIntToContentValues(ICursor, String, ContentValues)

Reads an Integer out of a field in a Cursor and writes it to a Map.

CursorIntToContentValues(ICursor, String, ContentValues, String)

Reads a Integer out of a field in a Cursor and writes it to a Map.

CursorIntToContentValuesIfPresent(ICursor, ContentValues, String)

Reads a Integer out of a column in a Cursor and writes it to a ContentValues.

CursorLongToContentValues(ICursor, String, ContentValues)

Reads a Long out of a field in a Cursor and writes it to a Map.

CursorLongToContentValues(ICursor, String, ContentValues, String)

Reads a Long out of a field in a Cursor and writes it to a Map.

CursorLongToContentValuesIfPresent(ICursor, ContentValues, String)

Reads a Long out of a column in a Cursor and writes it to a ContentValues.

CursorRowToContentValues(ICursor, ContentValues)

Read the entire contents of a cursor row and store them in a ContentValues.

CursorShortToContentValuesIfPresent(ICursor, ContentValues, String)

Reads a Short out of a column in a Cursor and writes it to a ContentValues.

CursorStringToContentValues(ICursor, String, ContentValues)

Reads a String out of a field in a Cursor and writes it to a Map.

CursorStringToContentValues(ICursor, String, ContentValues, String)

Reads a String out of a field in a Cursor and writes it to a Map.

CursorStringToContentValuesIfPresent(ICursor, ContentValues, String)

Reads a String out of a column in a Cursor and writes it to a ContentValues.

CursorStringToInsertHelper(ICursor, String, DatabaseUtils+InsertHelper, Int32)

Reads a String out of a field in a Cursor and writes it to an InsertHelper.

Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
DumpCurrentRow(ICursor)

Prints the contents of a Cursor's current row to System.

DumpCurrentRow(ICursor, PrintStream)

Prints the contents of a Cursor's current row to a PrintSteam.

DumpCurrentRow(ICursor, StringBuilder)

Prints the contents of a Cursor's current row to a StringBuilder.

DumpCurrentRowToString(ICursor)

Dump the contents of a Cursor's current row to a String.

DumpCursor(ICursor)

Prints the contents of a Cursor to System.

DumpCursor(ICursor, PrintStream)

Prints the contents of a Cursor to a PrintSteam.

DumpCursor(ICursor, StringBuilder)

Prints the contents of a Cursor to a StringBuilder.

DumpCursorToString(ICursor)

Prints the contents of a Cursor to a String.

Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetCollationKey(String)

return the collation key

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetHexCollationKey(String)

return the collation key in hex format

GetSqlStatementType(String)

Returns one of the following which represent the type of the given SQL statement.

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
LongForQuery(SQLiteDatabase, String, String[])

Utility method to run the query on the db and return the value in the first column of the first row.

LongForQuery(SQLiteStatement, String[])

Utility method to run the pre-compiled query and return the value in the first column of the first row.

Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
QueryNumEntries(SQLiteDatabase, String)

Query the table for the number of rows in the table.

QueryNumEntries(SQLiteDatabase, String, String)

Query the table for the number of rows in the table.

QueryNumEntries(SQLiteDatabase, String, String, String[])

Query the table for the number of rows in the table.

ReadExceptionFromParcel(Parcel)

Special function for reading an exception result from the header of a parcel, to be used after receiving the result of a transaction.

ReadExceptionWithFileNotFoundExceptionFromParcel(Parcel)
ReadExceptionWithOperationApplicationExceptionFromParcel(Parcel)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SqlEscapeString(String)

SQL-escape a string.

StringForQuery(SQLiteDatabase, String, String[])

Utility method to run the query on the db and return the value in the first column of the first row.

StringForQuery(SQLiteStatement, String[])

Utility method to run the pre-compiled query and return the value in the first column of the first row.

ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteExceptionToParcel(Parcel, Exception)

Special function for writing an exception result at the header of a parcel, to be used when returning an exception from a transaction.

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to