Klasse SQLiteV2
java.lang.Object
ch.framedev.javasqliteutils.SQLiteV2
This Plugin was Created by FrameDev
Package : mysql
Date: 07.03.21
Project: untitled
Copyrighted by FrameDev
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanAdds a new column to an existing table.voidaddColumnAsync(String table, String column, Callback<Boolean> callback) Asynchronously adds a new column to an existing table.voidclose()connect()voidconnectAsync(Callback<Connection> callback) booleancreateTable(String tableName, boolean date, String[] columns) Creates a table with the specified name and columns.voidcreateTableAsync(String tableName, boolean date, String[] columns, Callback<Boolean> callback) Asynchronously creates a table with the specified name and columns.booleandeleteDataInTable(String table, String where) Deletes data from a specified table based on a condition.booleandeleteDataInTable(String table, String whereColumn, String whereValue, String andColumn, String andValue) Deletes data from a specified table based on two conditions.voiddeleteDataInTableAsync(String table, String where, Callback<Boolean> callback) Asynchronously deletes data from a specified table based on a condition.voiddeleteDataInTableAsync(String table, String whereColumn, String whereValue, String andColumn, String andValue, Callback<Boolean> callback) Asynchronously deletes data from a specified table based on two conditions.booleanAsynchronously checks if a record exists in a specified table based on two conditions.booleanChecks if a record exists in a specified table based on a column and data.booleanChecks if a record exists in a specified table based on two conditions.voidAsynchronously checks if a record exists in a specified table based on a column and data.voidexistsAsync(String table, String column, String data, String andColumn, String andValue, Callback<Boolean> callback) Asynchronously checks if a record exists in a specified table based on two conditions.Asynchronously retrieves multiple values from a specified table based on a column and data.Retrieves multiple values from a specified table based on a column and data.Asynchronously retrieves a single value from a specified table based on a column and data.Retrieves a single value from a specified table based on a column and data.<T> TRetrieves a single value from a specified table based on a column and data, with type casting.voidgetAsync(String table, String[] selectedColumns, String column, Object data, Callback<List<Object>> callback) Asynchronously retrieves multiple values from a specified table based on a column and data.voidAsynchronously retrieves a single value from a specified table based on a column and data.<T> voidgetAsync(String table, String selected, String column, Object data, Class<T> type, Callback<T> callback) Asynchronously retrieves a single value from a specified table based on a column and data, with type casting.getOptional(String table, String selected, String[] column, Object[] data) <T> Optional<T> booleaninsertData(String table, Object[] data, String[] columns) Inserts data into a specified table with the given columns.voidAsynchronously inserts data into a specified table with the given columns.booleanisTableExists(String table) Checks if a table exists in the SQLite database.voidisTableExistsAsync(String table, Callback<Boolean> callback) Asynchronously checks if a table exists in the SQLite database.booleanremoveColumn(String table, String column) Removes a column from an existing table.voidremoveColumnAsync(String table, String column, Callback<Boolean> callback) Asynchronously removes a column from an existing table.showColumns(String table) Retrieves the names of all columns in a specified table.voidshowColumnsAsync(String table, Callback<List<String>> callback) Asynchronously retrieves the names of all columns in a specified table.booleanupdateData(String table, String[] columns, Object[] values, String where) Updates data in a specified table with multiple columns.booleanupdateData(String table, String selected, Object data, String where) Updates data in a specified table.voidupdateDataAsync(String table, String[] columns, Object[] values, String where, Callback<Boolean> callback) Asynchronously updates data in a specified table with multiple columns.voidupdateDataAsync(String table, String selected, Object data, String where, Callback<Boolean> callback) Asynchronously updates data in a specified table.
-
Felddetails
-
connection
-
-
Konstruktordetails
-
SQLiteV2
-
-
Methodendetails
-
connectAsync
-
connect
-
close
public void close() -
isTableExists
Checks if a table exists in the SQLite database.- Parameter:
table- The name of the table to check.- Gibt zurück:
- true if the table exists, false otherwise.
-
isTableExistsAsync
-
createTable
Creates a table with the specified name and columns.- Parameter:
tableName- The name of the table to create.date- Whether to include a date column.columns- The columns to include in the table.- Gibt zurück:
- true if the table was created successfully, false otherwise.
-
createTableAsync
public void createTableAsync(String tableName, boolean date, String[] columns, Callback<Boolean> callback) Asynchronously creates a table with the specified name and columns.- Parameter:
tableName- The name of the table to create.date- Whether to include a date column.columns- The columns to include in the table.callback- The callback to handle the result.
-
insertData
Inserts data into a specified table with the given columns.- Parameter:
table- The name of the table to insert data into.data- The data to insert.columns- The columns corresponding to the data.- Gibt zurück:
- true if the insertion was successful, false otherwise.
-
insertDataAsync
public void insertDataAsync(String table, Object[] data, String[] columns, Callback<Boolean> callback) Asynchronously inserts data into a specified table with the given columns.- Parameter:
table- The name of the table to insert data into.data- The data to insert.columns- The columns corresponding to the data.callback- The callback to handle the result.
-
updateData
Updates data in a specified table.- Parameter:
table- The name of the table to update.selected- The column to update.data- The new value for the column.where- The condition for the update (e.g., "id = 1").- Gibt zurück:
- true if the update was successful, false otherwise.
-
updateDataAsync
public void updateDataAsync(String table, String selected, Object data, String where, Callback<Boolean> callback) Asynchronously updates data in a specified table.- Parameter:
table- The name of the table to update.selected- The column to update.data- The new value for the column.where- The condition for the update (e.g., "id = 1").callback- The callback to handle the result.
-
updateData
Updates data in a specified table with multiple columns.- Parameter:
table- The name of the table to update.columns- The columns to update.values- The new values for the columns.where- The condition for the update (e.g., "id = 1").- Gibt zurück:
- true if the update was successful, false otherwise.
-
updateDataAsync
public void updateDataAsync(String table, String[] columns, Object[] values, String where, Callback<Boolean> callback) Asynchronously updates data in a specified table with multiple columns.- Parameter:
table- The name of the table to update.columns- The columns to update.values- The new values for the columns.where- The condition for the update (e.g., "id = 1").callback- The callback to handle the result.
-
deleteDataInTable
Deletes data from a specified table based on a condition.- Parameter:
table- The name of the table to delete data from.where- The condition for the deletion (e.g., "id = 1").- Gibt zurück:
- true if the deletion was successful, false otherwise.
-
deleteDataInTableAsync
Asynchronously deletes data from a specified table based on a condition.- Parameter:
table- The name of the table to delete data from.where- The condition for the deletion (e.g., "id = 1").callback- The callback to handle the result.
-
deleteDataInTable
public boolean deleteDataInTable(String table, String whereColumn, String whereValue, String andColumn, String andValue) Deletes data from a specified table based on two conditions.- Parameter:
table- The name of the table to delete data from.whereColumn- The column for the first condition.whereValue- The value for the first condition.andColumn- The column for the second condition.andValue- The value for the second condition.- Gibt zurück:
- true if the deletion was successful, false otherwise.
-
deleteDataInTableAsync
public void deleteDataInTableAsync(String table, String whereColumn, String whereValue, String andColumn, String andValue, Callback<Boolean> callback) Asynchronously deletes data from a specified table based on two conditions.- Parameter:
table- The name of the table to delete data from.whereColumn- The column for the first condition.whereValue- The value for the first condition.andColumn- The column for the second condition.andValue- The value for the second condition.callback- The callback to handle the result.
-
exists
Checks if a record exists in a specified table based on a column and data.- Parameter:
table- The name of the table to check.column- The column to check.data- The data to check for existence.- Gibt zurück:
- true if the record exists, false otherwise.
-
existsAsync
Asynchronously checks if a record exists in a specified table based on a column and data.- Parameter:
table- The name of the table to check.column- The column to check.data- The data to check for existence.callback- The callback to handle the result.
-
exists
Checks if a record exists in a specified table based on two conditions.- Parameter:
table- The name of the table to check.column- The column to check.data- The data to check for existence.andColumn- The second column for the condition.andValue- The value for the second condition.- Gibt zurück:
- true if the record exists, false otherwise.
-
exists
-
existsAsync
public void existsAsync(String table, String column, String data, String andColumn, String andValue, Callback<Boolean> callback) Asynchronously checks if a record exists in a specified table based on two conditions.- Parameter:
table- The name of the table to check.column- The column to check.data- The data to check for existence.andColumn- The second column for the condition.andValue- The value for the second condition.callback- The callback to handle the result.
-
get
Retrieves a single value from a specified table based on a column and data.- Parameter:
table- The name of the table to query.selected- The column to select.column- The column to filter by.data- The value to filter by.- Gibt zurück:
- The value from the selected column, or null if not found.
-
get
Asynchronously retrieves a single value from a specified table based on a column and data.- Parameter:
table- The name of the table to query.selected- The column to select.column- The column to filter by.data- The value to filter by.
-
getOptional
-
getAsync
public void getAsync(String table, String selected, String column, Object data, Callback<Object> callback) Asynchronously retrieves a single value from a specified table based on a column and data.- Parameter:
table- The name of the table to query.selected- The column to select.column- The column to filter by.data- The value to filter by.callback- The callback to handle the result.
-
get
Retrieves multiple values from a specified table based on a column and data.- Parameter:
table- The name of the table to query.selectedColumns- The columns to select.column- The column to filter by.data- The value to filter by.- Gibt zurück:
- A list of values from the selected columns, or an empty list if not found.
-
get
Asynchronously retrieves multiple values from a specified table based on a column and data.- Parameter:
table- The name of the table to query.selectedColumns- The columns to select.column- The column to filter by.data- The value to filter by.
-
getAsync
public void getAsync(String table, String[] selectedColumns, String column, Object data, Callback<List<Object>> callback) Asynchronously retrieves multiple values from a specified table based on a column and data.- Parameter:
table- The name of the table to query.selectedColumns- The columns to select.column- The column to filter by.data- The value to filter by.callback- The callback to handle the result.
-
get
Retrieves a single value from a specified table based on a column and data, with type casting.- Parameter:
table- The name of the table to query.selected- The column to select.column- The column to filter by.data- The value to filter by.type- The expected type of the result.- Gibt zurück:
- The value from the selected column, cast to the specified type, or null if not found or type mismatch.
-
getOptional
-
getAsync
public <T> void getAsync(String table, String selected, String column, Object data, Class<T> type, Callback<T> callback) Asynchronously retrieves a single value from a specified table based on a column and data, with type casting.- Parameter:
table- The name of the table to query.selected- The column to select.column- The column to filter by.data- The value to filter by.type- The expected type of the result.callback- The callback to handle the result.
-
addColumn
-
addColumnAsync
Asynchronously adds a new column to an existing table.- Parameter:
table- The name of the table to add the column to.column- The column definition (e.g., "new_column TEXT").callback- The callback to handle the result.
-
removeColumn
-
removeColumnAsync
-
showColumns
-
showColumnsAsync
-