Define, query, and control your data with ease.
Data is the lifeblood of any application, and bknd provides the tools to handle it effortlessly. From defining entities to executing complex queries, bknd offers a developer-friendly, intuitive, and powerful data management experience.
Model entities with fields and relationships, automatically synced to your database.
primary
, text
, number
, date
, boolean
, enum
, json
, and jsonschema
.many-to-one
, one-to-one
, many-to-many
, and polymorphic
.Use the EntityManager to simplify handling your entities. Access data efficiently with the Repository:
with
and joins.where
object: $eq
, $ne
, $isnull
, $notnull
, $in
, $notin
, $gt
, $gte
, $lt
, $lte
, $between
.Create, update, and delete entity data with confidence.
$create
, $set
, $attach
,
$detach
.Hook into critical lifecycle events for fine-grained control:
find-one-before
, find-one-after
, find-many-before
, find-many-after
.insert-before
, insert-after
, update-before
, update-after
, delete-before
, delete-after
.The Connection class communicates with the database. It’s based on kysely, so that it generally supports multiple database dialects (but currently only SQLite/LibSQL is supported).
Whether you’re modeling simple data structures or managing complex relationships, bknd’s data tools empower you to build applications with confidence and scalability.