SQLite
This extension helps you to access SQLite database that is also called offline MYSQL of your app. This extension comes with many features which allows you to use the SQLite database very easily with predefined queries and function with inbuilt encryption.
All Blocks
![fc571361ff8a383e615f405c2e266d3ef4b24be0](https://kodular-community.s3.dualstack.eu-west-1.amazonaws.com/original/4X/8/4/8/8485e23aec76bfa7051e36f600a11f71958c0678.png)
Documentation
Initialize
Initializes the SQLite instance
Parameter | Type |
---|---|
dbName | text |
OpenDatabase
Opens the db
CloseDatabase
Close the database
CreateTable
Creates a table with given columns and table name
Parameter | Type |
---|---|
tableName | text |
columnNames | list |
AddRow
Adds a row in the table
Parameter | Type |
---|---|
tableName | text |
columns | list |
values | list |
Return Type: number
GetRows
Get all the rows from table with selection query
Parameter | Type |
---|---|
tableName | text |
whereClause | text |
value | text |
GetAllRows
Get all the rows from the table
Parameter | Type |
---|---|
tableName | text |
UpdateRows
Updates the rows to given values which contains the given selection args in given where clause
Parameter | Type |
---|---|
tableName | text |
columns | list |
values | list |
whereClause | text |
selectionArgs | list |
Return Type: number
GetTotalNoOfRows
Returns the total no of rows present in the given table
Parameter | Type |
---|---|
tableName | text |
Return Type: number
DeleteRow
Deletes all the rows which contains the given value in given where clause
Parameter | Type |
---|---|
tableName | text |
whereClause | text |
value | text |
Return Type: number
DeleteAll
Truncate the whole table by deleting all the rows of the table
Parameter | Type |
---|---|
tableName | text |
Return Type: number
RunSQL
Run your custom SQL query, use ? to denote the selection args
Parameter | Type |
---|---|
sql | text |
selectionArgs | list |
Return Type: list
ImportDatabase
Imports the database, use //fileName to import the database from the assets
Parameter | Type |
---|---|
fileName | text |
ExportDatabase
Exports the database
Parameter | Type |
---|---|
fileName | text |
ImportDataFromAirtable
This block saves the data from airtable GetAllRows json response to the SQLite, make sure you have initialized the database
Parameter | Type |
---|---|
tableName | text |
jsonResponse | text |
Encrypt
Encrypt the given string, make sure you have set the encryption key first
Parameter | Type |
---|---|
inputText | text |
Return Type: text
Decrypt
Decrypt the given encrypted hash, make sure you have set the encryption key first other wise it will return the same string.
Parameter | Type |
---|---|
encryptedHash | text |
Return Type: text
ListFixer
fixes multi-column lists from SELECT
Parameter | Type |
---|---|
list | list |
Return Type: any
ErrorOccurred
This event raises when any error occurred
Parameter | Type |
---|---|
error | text |
GotRows
Triggered when rows are fetched
Parameter | Type |
---|---|
rows | list |
total | number |
SQLError
Triggered when any sql error occurs
Parameter | Type |
---|---|
error | text |
ImportSuccessful
Triggered when the database is imported successfully
Parameter | Type |
---|---|
filePath | text |
ExportSuccessful
Triggered when the database is exported successfully
Parameter | Type |
---|---|
filePath | text |
How to Use
Import Data From Airtable
with this extension you can directly save the data after loading it from airtable.
Just enter the table name and the json response, it will automatically create the table and will save your data in that table then you can use GetRows later to fetch. This will help you to reduce the data loading time and the bandwidth of your airtable account.
Encryption
Set the encryption key, the extension uses AES/CBC/PKCS7Padding encryption, if you leave the key empty then no encryption will be used.
Price
For India :- βΉ249
Outside India :- 3.99$
How to buy
Credit
Thanks @Shreyash for the super power full Rush.
Some source has been taken from:
frdfsnlght/aix-SQLite: AppInventor extension for SQLite (github.com)
Thanks you
Sumitβ