Skip to content

SQLite

Database Define

db = danio.Database("sqlite://test.db")

Primary Field

We may need change danio's field type define to INTEGER for primary field:

@dataclasses.dataclass
class BaseSQLiteModel(danio.Model):
    id: int = danio.field(
        danio.IntField, primary=True, auto_increment=True, type="INTEGER"
    )

For Update/Share

SQLite do not support for update and for share lock.