|
Constants or methods |
Type |
Describe |
|
public static final int open_readonly |
Constant |
Open a database as read-only |
|
public static final int Open_readwrite |
Constant |
Open a database in read/write mode |
|
public static final int Create_if_necessary |
Constant |
If the specified database file does not exist, create a new |
|
public static final int no_localized_collators |
Constant |
When opening a database, do not place the data in the order of the localization language |
|
public void BeginTransaction() |
Ordinary |
Start a transaction |
|
public void endtransaction() |
Ordinary |
End transaction, commit or rollback data |
|
public void Close() |
Ordinary |
Close the database |
|
public void execsql(String sql) |
Ordinary |
Execute SQL statement |
|
public void execsql(String sql, object[] bindargs) |
Ordinary |
Execute the SQL statement while binding the parameters |
|
public static sqlitedatabase OpenDatabase(
String path, sqlitedatabase.cursorfactory factory, int flags) |
Ordinary |
Opens the database file under the specified path in the specified mode |
|
public static sqlitedatabase openorcreatedatabase(
File file, Sqlitedatabase.cursorfactory Factory) |
Ordinary |
Open or create a database under a specified path |
|
Public long Insert(String table,
String nullcolumnhack, contentvalues values) |
Ordinary |
Insert data, table name, Nullcolumnhack represents incoming valuesnull, column is set to Null,values to represent all data to be inserted |
|
Public long insertorthrow(String table,
String nullcolumnhack, contentvalues values) |
Ordinary |
Inserts data but throws a SqlException exception |
|
public int Update(string table, contentvalues values,string whereclause, string[] whereargs) |
Ordinary |
Modify the data, table is the name of the tables, values update the data, Wherecluause indicates WHERE clause, Whereargs is the WHERE clause parameter, is used to replace "?" |
|
public int Delete(string table, String Whereclause,
String[] Whereargs) |
Ordinary |
Delete data, table name, whereclause indicate WHERE clause, Whereargs as parameter, replace "?" |
|
public boolean IsOpen() |
Ordinary |
Determine if the database is open |
|
public void setversion(int version) |
Ordinary |
Set the version of the database |
|
Public Cursor Query (boolean distinct, String table,
string[] columns, String selection,
String[]selectionargs,string GroupBy,
String has, string-by-clause, string limit) |
Ordinary |
Performs a data table query operation where the parameters are distinct (whether duplicate rows are removed), table (table name), columns (column name), selection (WHERE clause), Selectionargs (where condition), GroupBy (group), having (group filter), order by (sort), limit (limit clause) |
|
Public Cursor Query(String table, string[] columns,
String selection, string[] Selectionargs, String groupBy,
String has, string-by-clause) |
Ordinary |
Perform a data table query operation |
|
Public Cursor rawquery(String sql, string[] selectionargs) |
Ordinary |
Executes the specified SQL query statement |