database

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Xun

type Xun struct {
	Manager *capsule.Manager `json:"-"`
	Name    string           `json:"name,omitempty"`
	Driver  string           `json:"type"`
	Version string           `json:"version,omitempty"`
	Options XunOptions       `json:"options"`
	// contains filtered or unexported fields
}

Xun the xun database ORM

func (*Xun) ID

func (x *Xun) ID() string

ID get connector id

func (*Xun) Is

func (x *Xun) Is(typ int) bool

Is the connections from dsl

func (*Xun) Register

func (x *Xun) Register(file string, id string, dsl []byte) error

Register the connections from dsl

type XunHost

type XunHost struct {
	File    string `json:"file,omitempty"`
	Host    string `json:"host,omitempty"`
	Port    string `json:"port,omitempty"`
	User    string `json:"user,omitempty"`
	Pass    string `json:"pass,omitempty"`
	Primary bool   `json:"primary,omitempty"`
	// contains filtered or unexported fields
}

XunHost the connection host

type XunOptions

type XunOptions struct {
	DB          string    `json:"db"`
	TablePrefix string    `json:"prefix"`
	Collation   string    `json:"collation,omitempty"`
	Charset     string    `json:"charset,omitempty"`
	ParseTime   bool      `json:"parseTime,omitempty"`
	Timeout     int       `json:"timeout,omitempty"`
	File        string    `json:"file,omitempty"`
	Hosts       []XunHost `json:"hosts"`
}

XunOptions the connetion options

Jump to

Keyboard shortcuts

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