UnitySQLiteAsync is asynchronous SQLite-net support for Unity.
sqlite-net is simple, powerful, cross-platform SQLite client and ORM for .NET. But sqlite-net's Asynchronous API based on Threading, it's heavy and not matched to Unity threading(single-thread). So I made Asynchronous API based on UniTask, which is more suitable for Unity.
Also Can use Synchronous API.
Required Unity after 2018.3
Download package and import to your Unity project
Package contains UniTask, sqlite-net, sqlite-net-extensions
You can also find example in sqlite-net Example and Document. you need to replace Task to UniTask, Task.Result to await UniTask.
The library contains simple attributes that you can use to control the construction of tables
public class Customer
{
[AutoIncrement, PrimaryKey]
public int Id { get; set; }
[MaxLength (64)]
public string FirstName { get; set; }
[MaxLength (64)]
public string LastName { get; set; }
[MaxLength (64), Indexed]
public string Email { get; set; }
}Insert row example
public async UniTask AddCustomerAsync(Customer customer)
{
var db = new SQLiteAsyncConnection(databasePath);
await db.InsertAsync(customer);
}Get example
public async UniTask<Customer> GetCustomerAsync(int id)
{
var db = new SQLiteAsyncConnection(databasePath);
Customer customer = await db.GetAsync<Customer> (customer.Id);
return customer;
}Create(or Update new column) example
public async void Main()
{
var db = new SQLiteAsyncConnection(databasePath);
await db.CreateTableAsync<Customer> ();
await AddCustomerAsync(new Customer());
var customer = await GetCustomerAsync(0);
}Since UniTask runs only in play mode, use Unity Test Runner with PlayMode. Unity Test Runner also help you to test in device.

Android (V30, API Level 28) passed all 195 tests.
iOS (iPhone 6+, iOS 12.4.3) passed all 195 tests.
All the tests were imported from sqlite-net and converted to the Unitask version.
This project is licensed under the MIT License - see the LICENSE file for details