encode

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package encode adds `encode(data, format)` and `decode(text, format)` scalar functions covering the common binary-to-text codecs SQLite lacks (only hex/quote are built in):

SELECT encode('hello', 'base64');   -- 'aGVsbG8='
SELECT decode('aGVsbG8=', 'base64'); -- x'68656c6c6f' (the blob "hello")

Supported formats: base64, base64url, base32, base32hex, base16 / hex, ascii85 / base85, and url (percent-encoding). This is the codec half of the sqlean `crypto` surface; the digest half is covered by ext/hash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(c *sqlite.Conn) error

Register installs the encode and decode scalar functions on c.

Per-connection registration. For pool-wide install, blank-import the auto sub-package:

import _ "gosqlite.org/ext/encode/auto"

Types

This section is empty.

Directories

Path Synopsis
Package auto wires the encode / decode scalar functions via a sqlite.Driver.ConnectHook so every new connection registers them.
Package auto wires the encode / decode scalar functions via a sqlite.Driver.ConnectHook so every new connection registers them.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL