-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Labels
area:rainbowDapper.RainbowDapper.Rainbow
Description
When I use Dapper.Rainbow for SQLite, the following message appears: System.Data.SQLite.SQLiteException: "SQL logic error No such table: INFORMATION_SCHEMA.TABLES"
Is Dapper.Rainbow not supporting SQLite?
The code show as below:
class Program
{
static void Main(string[] args)
{
string fileName = "MyDatabase.db";
if (!File.Exists(fileName)) SQLiteConnection.CreateFile(fileName);
SQLiteConnection connection = new SQLiteConnection($"Data Source = {fileName}");
MyDatabase db = MyDatabase.Init(connection, 2000);
db.Execute("CREATE TABLE IF NOT EXISTS Cat(Id integer PRIMARY KEY AUTOINCREMENT, Name text NOT NULL)");
db.Cats.Insert(new Cat { Name = "Tom" });
}
}
class MyDatabase:Database<MyDatabase>
{
public Table<Cat> Cats { set; get; }
}
class Cat
{
public int? Id { set; get; }
public string Name { set; get; }
}
Metadata
Metadata
Assignees
Labels
area:rainbowDapper.RainbowDapper.Rainbow