Skip to content

Is Dapper.Rainbow not supporting SQLite? #1080

@cnxy

Description

@cnxy

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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions