dbfs

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS added in v0.8.0

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

func New added in v0.8.0

func New(file path.Local, opts ...Option) (*FS, error)

New creates a new filesystem, based on a sqlite database that resides in a local file file is the location of the database file.

func NewInMemory added in v0.8.0

func NewInMemory(abs path.Absolute, opts ...Option) (*FS, error)

func (*FS) Abs added in v0.8.0

func (m *FS) Abs(r path.Relative) path.Absolute

func (*FS) Close added in v0.8.0

func (f *FS) Close() error

func (*FS) Delete added in v0.8.0

func (fsys *FS) Delete(p path.Relative, recursive bool) (err error)

func (*FS) Exists added in v0.8.0

func (fsys *FS) Exists(p path.Relative) bool

func (*FS) ModTime added in v0.8.0

func (fsys *FS) ModTime(p path.Relative) (t time.Time, err error)

func (*FS) Reader added in v0.8.0

func (fsys *FS) Reader(p path.Relative) (io.ReadCloser, error)

func (*FS) Size added in v0.8.0

func (fsys *FS) Size(file path.Relative) int64

func (*FS) Write added in v0.8.0

func (fsys *FS) Write(p path.Relative, rd io.ReadCloser, inbetween bool) (err error)

type Option added in v0.8.1

type Option func(*FS)

Option is an option for the dbfs

func OptBlobTable added in v0.8.1

func OptBlobTable(name string) Option

OptBlobTable sets the name of the blob table

func OptCreateTables added in v0.8.1

func OptCreateTables() Option

OptCreateTables sets the option for creating/initializing the tables (always the default for in memory databases)

func OptFileTable added in v0.8.1

func OptFileTable(name string) Option

OptFileTable sets the name of the file table

func OptSqliteFlags added in v0.8.1

func OptSqliteFlags(flags ...sqlite.OpenFlags) Option

OptSqliteFlags sets the flags of the underlying sqlite db

Jump to

Keyboard shortcuts

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