file

package
v0.0.0-...-5c9d423 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCreateCursor = fmt.Errorf("at INSERT INTO: error create a new cursor")
View Source
var ErrCreatePage = fmt.Errorf("at INSERT INTO: error create a new page")
View Source
var ErrExistTable = fmt.Errorf("at CREATE TABLE: exist table")
View Source
var ErrIncorrectNameFields = fmt.Errorf("at SELECT: expected field to SELECT")
View Source
var ErrIncorrectType = fmt.Errorf("exec: incorret type")
View Source
var ErrInvalidType = errors.New("invalid type")

Functions

func SetName

func SetName(name string) options.Option

func SetPath

func SetPath(path string) options.Option

Types

type CreateCursorError

type CreateCursorError struct {
	Type string
}

CreateCursorError is an error type returned when the cursor cannot be created

func (*CreateCursorError) Error

func (e *CreateCursorError) Error() string

type CreateExistIndexError

type CreateExistIndexError struct {
	Name string
}

CreateExistIndexError is an error type returned when the index already exists

func (*CreateExistIndexError) Error

func (e *CreateExistIndexError) Error() string

type File

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

func New

func New(ctx context.Context, opts ...options.Option) (*File, error)

func (*File) Close

func (f *File) Close() error

func (*File) CreateIndex

func (f *File) CreateIndex(query *v1.Query) error

func (*File) CreateTable

func (f *File) CreateTable(q *query.Query) error

func (*File) Delete

func (f *File) Delete(query *v1.Query) error

func (*File) DropIndex

func (f *File) DropIndex(name string) error

func (*File) DropTable

func (f *File) DropTable(name string) error

func (*File) Exec

func (f *File) Exec(query *v1.Query) (any, error)

func (*File) Insert

func (f *File) Insert(query *v1.Query) error

func (*File) Select

func (f *File) Select(query *v1.Query) ([]*page.Row, error)

func (*File) Update

func (f *File) Update(query *v1.Query) error

type IncorrectNameFieldsError

type IncorrectNameFieldsError struct {
	Field string
	Table string
}

IncorrectNameFieldsError is an error type returned when the name of the field is incorrect

func (*IncorrectNameFieldsError) Error

func (e *IncorrectNameFieldsError) Error() string

type IncorrectTypeFieldsError

type IncorrectTypeFieldsError struct {
	Field string
	Table string
}

IncorrectTypeFieldsError is an error type returned when the type of the field is incorrect

func (*IncorrectTypeFieldsError) Error

func (e *IncorrectTypeFieldsError) Error() string

type NotExistTableError

type NotExistTableError struct {
	Table string
	Type  string
}

NotExistTableError is an error type returned when the table does not exist

func (*NotExistTableError) Error

func (e *NotExistTableError) Error() string

type Option

type Option func(file *File) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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