moonbitstack/moonorm/session does not have a README file
pub(all) suberror LostUpdate {
LostUpdate(String)
}impl Show for LostUpdateasync fn[T] AsyncSession::create_table(self : AsyncSession, model : Model[T], if_not_exists? : Bool) -> ExecResult raise DbErrorfn[T] AsyncSession::delete_all(self : AsyncSession, model : Model[T], records : Array[T]) -> Unit raise DbErrorfn[T] AsyncSession::delete_record(self : AsyncSession, model : Model[T], record : T) -> Unit raise DbErrorasync fn AsyncSession::execute(self : AsyncSession, sql : String, params : Array[Value]) -> ExecResult raise DbErrorasync fn[T] AsyncSession::fetch_as(self : AsyncSession, model : Model[T], stmt : Select) -> Array[T] raise DbErrorasync fn[T] AsyncSession::get(self : AsyncSession, model : Model[T], pk : Value) -> T? raise DbErrorasync fn[T] AsyncSession::get_by(self : AsyncSession, model : Model[T], key : Array[Value]) -> T? raise DbErrorasync fn[T] AsyncSession::insert_record(self : AsyncSession, model : Model[T], record : T) -> ExecResult raise DbErrorasync fn[S, T] AsyncSession::load(self : AsyncSession, source : S, rel : Relation[S, T], strategy? : LoadStrategy) -> Array[T] raise DbErrorasync fn[S, T] AsyncSession::load_batch(self : AsyncSession, sources : Array[S], rel : Relation[S, T], strategy? : LoadStrategy) -> Array[Array[T]] raise DbErrorasync fn[S, T] AsyncSession::load_many(self : AsyncSession, source : S, rel : ManyToMany[S, T], strategy? : LoadStrategy) -> Array[T] raise DbErrorasync fn[S, T] AsyncSession::load_many_batch(self : AsyncSession, sources : Array[S], rel : ManyToMany[S, T], strategy? : LoadStrategy) -> Array[Array[T]] raise DbErrorasync fn[S, T] AsyncSession::load_one(self : AsyncSession, source : S, rel : Relation[S, T], strategy? : LoadStrategy) -> T? raise DbErrorasync fn[S, T] AsyncSession::load_one_batch(self : AsyncSession, sources : Array[S], rel : Relation[S, T], strategy? : LoadStrategy) -> Array[T?] raise DbErrorasync fn AsyncSession::modify_versioned(self : AsyncSession, stmt : Update, what? : String) -> ExecResultfn AsyncSession::on(self : AsyncSession, event : HookEvent, handler : (HookContext) -> Unit raise DbError) -> Unitasync fn AsyncSession::query(self : AsyncSession, sql : String, params : Array[Value]) -> Array[Row] raise DbErrorasync fn AsyncSession::query_stream(self : AsyncSession, sql : String, params : Array[Value]) -> &AsyncCursor raise DbErrorasync fn[T] AsyncSession::stream_as(self : AsyncSession, model : Model[T], stmt : Select) -> AsyncRowStream[T] raise DbErrorasync fn AsyncSession::transaction(self : AsyncSession, body : async () -> Unit raise DbError) -> Unit raise DbErrorfn[T] AsyncSession::update_record(self : AsyncSession, model : Model[T], record : T) -> Unit raise DbErrorasync fn[D : AsyncDriver, T] AsyncSession::with_pool(pool : AsyncPool[D], f : async (AsyncSession) -> T raise DbError, dialect? : Dialect) -> T raise DbErrortype Corefn HookContext::new(event : HookEvent, table? : String, columns? : Array[(String, Value)]) -> HookContextpub(all) enum HookEvent {
BeforeInsert
AfterInsert
BeforeUpdate
AfterUpdate
BeforeDelete
AfterDelete
BeforeFlush
AfterFlush
BeforeCommit
AfterCommit
AfterRollback
} derive(Eq)pub(all) enum IsolationLevel {
ReadUncommitted
ReadCommitted
RepeatableRead
Serializable
} derive(Eq)fn[T] Session::create_table(self : Session, model : Model[T], if_not_exists? : Bool) -> ExecResult raise DbErrorfn[T] Session::insert_record(self : Session, model : Model[T], record : T) -> ExecResult raise DbErrorfn[S, T] Session::load_many(self : Session, source : S, rel : ManyToMany[S, T], strategy? : LoadStrategy) -> Array[T] raise DbErrorfn[S, T] Session::load_many_batch(self : Session, sources : Array[S], rel : ManyToMany[S, T], strategy? : LoadStrategy) -> Array[Array[T]] raise DbErrorfn[S, T] Session::load_one(self : Session, source : S, rel : Relation[S, T], strategy? : LoadStrategy) -> T? raise DbErrorfn Session::on(self : Session, event : HookEvent, handler : (HookContext) -> Unit raise DbError) -> UnitInstall
Download zipAn ORM and SQL toolkit for MoonBit.