db

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package db provides database protocol for NVGD.

Index

Constants

This section is empty.

Variables

View Source
var NullReplacement = "(null)"

NullReplacement replaces null value in LTSV.

Functions

This section is empty.

Types

type Config

type Config map[string]Param

Config represents configuration for Handler.

type DumpHandler

type DumpHandler struct {
}

func (*DumpHandler) Open

func (dh *DumpHandler) Open(u *url.URL) (*resource.Resource, error)

type Handler

type Handler struct {
}

Handler is database protocol handler.

func (*Handler) Open

func (h *Handler) Open(u *url.URL) (*resource.Resource, error)

Open creates a database handler.

type Param

type Param struct {
	// Driver represents driver name for database.
	Driver string `yaml:"driver"`

	// Name represents driver-specific data source name.
	Name string `yaml:"name"`

	// MaxRows is limitation of rows.
	MaxRows int `yaml:"max_rows"`

	// MultipleDatabase to support multiple database in an instance.
	MultipleDatabase bool `yaml:"multiple_database"`
}

Param is connection parameter for the database.

type RestoreHandler

type RestoreHandler struct {
}

func (*RestoreHandler) Open

func (rh *RestoreHandler) Open(u *url.URL) (*resource.Resource, error)

func (*RestoreHandler) Post

func (rh *RestoreHandler) Post(u *url.URL, r io.Reader) (*resource.Resource, error)

type UpdateHandler

type UpdateHandler struct {
}

func (*UpdateHandler) Open

func (uh *UpdateHandler) Open(u *url.URL) (*resource.Resource, error)

func (*UpdateHandler) Post

func (uh *UpdateHandler) Post(u *url.URL, r io.Reader) (*resource.Resource, error)

Jump to

Keyboard shortcuts

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