Versions in this module Expand all Collapse all v0 v0.0.6 Nov 27, 2026 v0.0.5 Nov 27, 2026 v0.0.4 Nov 25, 2026 Changes in this version type Writer + Room func(n int) (release func(), err error) v0.0.3 Nov 24, 2026 Changes in this version type Reader + func (r *Reader) Result() int64 v0.0.2 Nov 23, 2026 v0.0.1 Nov 22, 2026 Changes in this version + const ControlBodyBytes + const DefaultFrameBytes + const MaxDepth + var ErrMalformed = errors.New("wire: malformed response") + func AppendCall(dst []byte, k Kind, c *Call) ([]byte, error) + func AppendValue(dst []byte, v any) ([]byte, error) + func CutMessage(msg string, limit int) string + func DecodeValue(data []byte) (any, error) + func FormatReal(f float64) string + func Parse(kind Kind, body []byte, batchLimit int) (*Request, *Error) + func Path(k Kind, db string) string + func Route(method, path string) (Kind, string, *Error) + func ValidDatabaseName(s string) bool + type Args struct + type Call struct + Channel string + MinTxn int64 + Mode Mode + Named []NamedArg + Op Op + Params []any + SQL string + Seq int64 + TimeoutMS int64 + type Channel struct + Epoch int64 + ID string + Limits Limits + Mode Mode + Token string + type Code string + const CodeBehind + const CodeBusy + const CodeCancelled + const CodeChannelBusy + const CodeChannelLost + const CodeCommitFailed + const CodeCommitOutcomeUnknown + const CodeDatabaseExists + const CodeDatabaseNotFound + const CodeForbidden + const CodeInFlight + const CodeInternal + const CodeInvalidRequest + const CodeInvalidState + const CodeMaintenance + const CodeNeedsChannel + const CodeNoLeader + const CodeNotServing + const CodeOverloaded + const CodeOwnerUnreachable + const CodeRequestTooLarge + const CodeResultTooLarge + const CodeSQLError + const CodeSequenceConflict + const CodeSequenceGap + const CodeStaleSequence + const CodeStatementForbidden + const CodeTimeout + const CodeTooManyChannels + const CodeTransactionAborted + const CodeUnauthenticated + func (c Code) Recordable() bool + func (c Code) Status() int + type Column struct + Database string + DeclType string + Name string + Origin string + Table string + type Done struct + Channel *Channel + DataOmitted bool + Entries int64 + Epoch int64 + Kind DoneKind + LastInsertRowID int64 + LastSeq int64 + Limits *Limits + Outcome *Receipt + ParamCount int64 + ReadOnly bool + Resolution Resolution + RowsAffected int64 + SQLiteVersion string + Seq int64 + Txn int64 + TxnState TxnState + Wrote bool + type DoneKind uint8 + const DoneBatch + const DoneBegin + const DoneCancel + const DoneChannelDescribe + const DoneClose + const DoneCommit + const DoneDescribe + const DoneExecute + const DoneOpen + const DonePut + const DoneQuery + const DoneResolve + const DoneRollback + const DoneStatus + type Error struct + BatchIndex *int64 + Cause string + ChannelID string + Code Code + Epoch int64 + Final bool + Message string + NotExecuted bool + RequestID string + SQLiteCode int64 + SQLiteExtendedCode int64 + Seq int64 + Txn int64 + TxnState TxnState + func NewError(code Code, msg string) *Error + func (e *Error) Error() string + func (e *Error) Recorded(txnStatement bool) *Error + type Frame struct + Columns []Column + Done *Done + Error *Error + Kind FrameKind + Params []string + Row []any + type FrameKind uint8 + const FrameColumns + const FrameDone + const FrameError + const FrameParams + const FrameRow + type Kind uint8 + const KindCancel + const KindChannel + const KindClose + const KindDescribe + const KindOpen + const KindPut + const KindQuery + const KindResolve + const KindStatus + type Limits struct + BatchEntries int64 + CatchUpMS int64 + ChannelIdleMS int64 + ErrorMessageBytes int64 + FrameEntries int64 + HeaderBlockBytes int64 + HeldResultBytes int64 + KeepaliveMS int64 + LockWaitMS int64 + ReadTxnIdleMS int64 + ReadTxnLifetimeMS int64 + RequestBodyBytes int64 + ResolveBound int64 + ResponseMS int64 + ResultBytes int64 + RetainedRequestBytes int64 + StatementMS int64 + TerminalFrameBytes int64 + WriteTxnIdleMS int64 + WriteTxnLifetimeMS int64 + func DefaultLimits() Limits + func (l *Limits) Validate() error + type Mode uint8 + const ModeReadOnly + const ModeWrite + func (m Mode) String() string + type NamedArg struct + Name string + Value any + type Op uint8 + const OpBatch + const OpBegin + const OpCommit + const OpDescribe + const OpExecute + const OpPing + const OpRollback + const OpUnknown + type Reader struct + func NewReader(r io.Reader, k DoneKind, maxFrame int) (*Reader, error) + func (r *Reader) LimitResult(n int64) + func (r *Reader) Next() (*Frame, error) + type Receipt struct + Done *Done + Error *Error + type Request struct + Channel string + Execute *Statement + Kind Kind + MinTxn int64 + Mode Mode + Op Op + ParamSets []Args + Seq int64 + Statements []Statement + TimeoutMS int64 + func (r *Request) Bind(a Args, names []string, set func(index int, v any) error) error + func (r *Request) Validate() *Error + type Resolution string + const ResolutionCommitted + const ResolutionNotCommitted + const ResolutionPending + const ResolutionUnknown + type Result struct + LastInsertRowID int64 + RowsAffected int64 + type Statement struct + Args Args + SQL string + type TxnState string + const TxnAborted + const TxnNone + const TxnOpen + type Writer struct + func NewWriter(w io.Writer, frameBytes int, l Limits) (*Writer, error) + func (w *Writer) Columns(cols []Column) error + func (w *Writer) Done(d *Done) error + func (w *Writer) Error(e *Error) error + func (w *Writer) Keepalive() error + func (w *Writer) Params(names []string) error + func (w *Writer) Results(entries []Result) error + func (w *Writer) Row(values []any) error + func (w *Writer) Written() int64