Help us shape the future of Go! Take the 2026 Go Developer Survey

sqlite

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

Catalog implements the iceberg-go catalog.Catalog interface using SQLite

func NewCatalog

func NewCatalog(cfg *config.Config) (*Catalog, error)

NewCatalog creates a new SQLite-based catalog

func NewCatalogWithIO added in v0.2.0

func NewCatalogWithIO(name, dbPath string, db *sql.DB, fileSystem FileSystemInterface, fileIO icebergio.IO, warehouse string) (*Catalog, error)

NewCatalogWithIO creates a new SQLite-based catalog with custom file IO

func (*Catalog) CatalogType

func (c *Catalog) CatalogType() catalog.Type

CatalogType returns the catalog type

func (*Catalog) CheckNamespaceExists

func (c *Catalog) CheckNamespaceExists(ctx context.Context, namespace table.Identifier) (bool, error)

CheckNamespaceExists checks if a namespace exists

func (*Catalog) CheckTableExists

func (c *Catalog) CheckTableExists(ctx context.Context, identifier table.Identifier) (bool, error)

CheckTableExists checks if a table exists in the catalog

func (*Catalog) Close

func (c *Catalog) Close() error

Close closes the database connection

func (*Catalog) CommitTable

func (c *Catalog) CommitTable(ctx context.Context, tbl *table.Table, reqs []table.Requirement, updates []table.Update) (table.Metadata, string, error)

CommitTable commits table changes to the catalog

func (*Catalog) CreateNamespace

func (c *Catalog) CreateNamespace(ctx context.Context, namespace table.Identifier, props iceberg.Properties) error

CreateNamespace creates a new namespace

func (*Catalog) CreateTable

func (c *Catalog) CreateTable(ctx context.Context, identifier table.Identifier, schema *iceberg.Schema, opts ...catalog.CreateTableOpt) (*table.Table, error)

CreateTable creates a new table in the catalog

func (*Catalog) DropNamespace

func (c *Catalog) DropNamespace(ctx context.Context, namespace table.Identifier) error

DropNamespace drops a namespace from the catalog

func (*Catalog) DropTable

func (c *Catalog) DropTable(ctx context.Context, identifier table.Identifier) error

DropTable drops a table from the catalog

func (*Catalog) ListNamespaces

func (c *Catalog) ListNamespaces(ctx context.Context, parent table.Identifier) ([]table.Identifier, error)

ListNamespaces lists all namespaces, optionally filtered by parent

func (*Catalog) ListTables

func (c *Catalog) ListTables(ctx context.Context, namespace table.Identifier) iter.Seq2[table.Identifier, error]

ListTables lists all tables in a namespace

func (*Catalog) LoadNamespaceProperties

func (c *Catalog) LoadNamespaceProperties(ctx context.Context, namespace table.Identifier) (iceberg.Properties, error)

LoadNamespaceProperties loads properties for a namespace

func (*Catalog) LoadTable

func (c *Catalog) LoadTable(ctx context.Context, identifier table.Identifier, props iceberg.Properties) (*table.Table, error)

LoadTable loads a table from the catalog

func (*Catalog) Name

func (c *Catalog) Name() string

Name returns the catalog name

func (*Catalog) RenameTable

func (c *Catalog) RenameTable(ctx context.Context, from, to table.Identifier) (*table.Table, error)

RenameTable renames a table in the catalog

func (*Catalog) UpdateNamespaceProperties

func (c *Catalog) UpdateNamespaceProperties(ctx context.Context, namespace table.Identifier, removals []string, updates iceberg.Properties) (catalog.PropertiesUpdateSummary, error)

UpdateNamespaceProperties updates properties for a namespace

type FileSystemInterface added in v0.2.0

type FileSystemInterface interface {
	Create(path string) (io.WriteCloser, error)
}

FileSystemInterface abstracts file operations for different storage backends

Jump to

Keyboard shortcuts

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