lockbox

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version     uint32        `json:"version"`
	Schema      *arrow.Schema `json:"-"`
	CreatedAt   interface{}   `json:"createdAt"`
	CreatedBy   string        `json:"createdBy"`
	ModifiedAt  interface{}   `json:"modifiedAt"`
	ModifiedBy  string        `json:"modifiedBy"`
	BlockCount  int           `json:"blockCount"`
	AccessCount int           `json:"accessCount"`
}

Info represents information about a lockbox file

type Lockbox

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

Lockbox represents a lockbox file with high-level operations

func Create

func Create(filename string, schema *arrow.Schema, opts ...Option) (*Lockbox, error)

Create creates a new lockbox file with the given schema

func Open

func Open(filename string, opts ...Option) (*Lockbox, error)

Open opens an existing lockbox file

func (*Lockbox) Close

func (lb *Lockbox) Close() error

Close closes the lockbox file

func (*Lockbox) Info

func (lb *Lockbox) Info() (*Info, error)

Info returns information about the lockbox file

func (*Lockbox) Query

func (lb *Lockbox) Query(ctx context.Context, query string, opts ...Option) (*QueryResult, error)

Query performs a simple query on the lockbox data This is a basic implementation that reads all data and applies simple filters

func (*Lockbox) Read

func (lb *Lockbox) Read(ctx context.Context, opts ...Option) (arrow.Record, error)

Read reads an Arrow record from the lockbox

func (*Lockbox) Schema

func (lb *Lockbox) Schema() *arrow.Schema

Schema returns the Arrow schema of the lockbox

func (*Lockbox) Write

func (lb *Lockbox) Write(ctx context.Context, record arrow.Record, opts ...Option) error

Write writes an Arrow record to the lockbox

type Option

type Option func(*Options)

Option is a functional option for lockbox operations

func WithColumns

func WithColumns(columns ...string) Option

WithColumns sets the specific columns to operate on

func WithCreatedBy

func WithCreatedBy(createdBy string) Option

WithCreatedBy sets the creator name for lockbox operations

func WithPassword

func WithPassword(password string) Option

WithPassword sets the password for lockbox operations

type Options

type Options struct {
	Password  string
	CreatedBy string
	Columns   []string
}

Options for lockbox operations

type QueryResult

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

QueryResult represents the result of a query operation

func (*QueryResult) Next

func (qr *QueryResult) Next() bool

Next advances to the next row in the result set

func (*QueryResult) Record

func (qr *QueryResult) Record() arrow.Record

Record returns the current Arrow record

func (*QueryResult) Release

func (qr *QueryResult) Release()

Release releases the resources associated with the query result

func (*QueryResult) Schema

func (qr *QueryResult) Schema() *arrow.Schema

Schema returns the schema of the query result

Jump to

Keyboard shortcuts

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