XU XUv0.8.8
中文

API

#github.com/xulang-org/packages/sqlite

import: sqlite #github.com/xulang-org/packages/sqlite

counts: 4 fns, 0 methods, 4 types, 0 consts, 0 ifaces

SQLite database/sql driver backed by the official C API, statically linked through xu-c-1. Each connection owns a native database handle; parameters are bound by SQLite. No runtime Python, CLI or subprocess is required.

github.com/xulang-org/packages · 0.1.1 · Install and use

driver

XuAPI
pub fn driver() driver.Driver

Purpose

SQLite database/sql driver backed by the official C API, statically linked through xu-c-1. Each connection owns a native database handle; parameters are bound by SQLite. No runtime Python, CLI or subprocess is required.

Parameters

none

Returns

driver.Driver — a value of this type

open

XuAPI
pub fn open(path string) driver.Conn

Purpose

Open.

Parameters

path string
filesystem path (string)

Returns

driver.Conn — a value of this type

struct SqliteDriver

XuAPI
pub struct SqliteDriver {
    pub tag int
    pub path string
}

Purpose

Public struct `SqliteDriver`.

Parameters

tag int
field (int)
path string
filesystem path

struct SqliteConn

XuAPI
pub struct SqliteConn {
    pub st chan SqliteState
}

Purpose

Public struct `SqliteConn`.

Parameters

st chan SqliteState
field (channel; type chan SqliteState)

struct SqliteStmt

XuAPI
pub struct SqliteStmt {
    pub st chan SqliteState
    pub q string
}

Purpose

Public struct `SqliteStmt`.

Parameters

st chan SqliteState
field (channel; type chan SqliteState)
q string
field (string)

struct SqliteTx

XuAPI
pub struct SqliteTx {
    pub st chan SqliteState
    pub id int
    pub err string
}

Purpose

Public struct `SqliteTx`.

Parameters

st chan SqliteState
field (channel; type chan SqliteState)
id int
field (int)
err string
error

open_db

XuAPI
pub fn open_db(path string) sql.DB

Purpose

SQLite connection pool helpers. Configures thread-safe single-writer and multi-reader connections.

Parameters

path string
filesystem path (string)

Returns

sql.DB — a value of this type

open_pool

XuAPI
pub fn open_pool(path string, max_open int, max_idle int) sql.DB

Purpose

Open pool.

Parameters

path string
filesystem path (string)
max_open int
max_open (int)
max_idle int
max_idle (int)

Returns

sql.DB — a value of this type