mysql

package
v0.0.0-...-3a6b306 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVICE_NAME = "MYSQL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Log         logging.Logger
	DB          *graph.Database
	Credentials graph.Credentials

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(credentials *Credentials) *Client

func (*Client) CountAllEdges

func (mysql *Client) CountAllEdges(predicate *graph.Predicate) int64

func (*Client) CountRows

func (mysql *Client) CountRows(q string, args ...interface{}) int64

func (*Client) CreateDatabase

func (mysql *Client) CreateDatabase(name string) bool

func (*Client) DeleteVertex

func (mysql *Client) DeleteVertex(uid int64) bool

func (*Client) Exec

func (mysql *Client) Exec(q string, params ...interface{}) (bool, sql.Result)

func (*Client) InsertClass

func (mysql *Client) InsertClass(name string) (bool, int64)

func (*Client) InsertInternalTable

func (mysql *Client) InsertInternalTable(class *graph.Class) bool

func (*Client) InsertProperty

func (mysql *Client) InsertProperty(vertex *graph.Vertex, key string, value interface{}) bool

func (*Client) InsertVertex

func (mysql *Client) InsertVertex(class *graph.Class, X string) (bool, int64)

func (*Client) QueryAllEdges

func (mysql *Client) QueryAllEdges(predicate *graph.Predicate) (bool, []*graph.Link)

func (*Client) QueryClassCount

func (mysql *Client) QueryClassCount(class *graph.Class) int64

func (*Client) QueryClassList

func (mysql *Client) QueryClassList(class *graph.Class, limit, page int64) (bool, []*graph.Vertex)

func (*Client) QueryClassUID

func (mysql *Client) QueryClassUID(name string) (bool, int64)

func (*Client) QueryEdge

func (mysql *Client) QueryEdge(predicate *graph.Predicate, q string, args ...interface{}) (bool, *graph.Link)

func (*Client) QueryEdges

func (mysql *Client) QueryEdges(predicate *graph.Predicate, q string, args ...interface{}) (bool, []*graph.Link)

func (*Client) QueryInClassCount

func (mysql *Client) QueryInClassCount(class *graph.Class, predicate *graph.Predicate, subject *graph.Vertex) int64

func (*Client) QueryInClassList

func (mysql *Client) QueryInClassList(class *graph.Class, predicate *graph.Predicate, subject *graph.Vertex, limit int64, page int64) (bool, []*graph.Vertex)

func (*Client) QueryInCount

func (mysql *Client) QueryInCount(predicate *graph.Predicate, subject *graph.Vertex) int64

func (*Client) QueryInList

func (mysql *Client) QueryInList(predicate *graph.Predicate, subject *graph.Vertex, limit int64) (bool, []*graph.Vertex)
func (mysql *Client) QueryLink(q string, args ...interface{}) (bool, *graph.Link)
func (mysql *Client) QueryLinks(q string, args ...interface{}) (bool, []*graph.Link)

func (*Client) QueryOutClassCount

func (mysql *Client) QueryOutClassCount(class *graph.Class, predicate *graph.Predicate, subject *graph.Vertex) int64

func (*Client) QueryOutClassList

func (mysql *Client) QueryOutClassList(class *graph.Class, predicate *graph.Predicate, subject *graph.Vertex, limit int64, page int64) (bool, []*graph.Vertex)

func (*Client) QueryOutCount

func (mysql *Client) QueryOutCount(predicate *graph.Predicate, subject *graph.Vertex) int64

func (*Client) QueryOutList

func (mysql *Client) QueryOutList(predicate *graph.Predicate, subject *graph.Vertex, limit int64) (bool, []*graph.Vertex)

func (*Client) QueryProperties

func (mysql *Client) QueryProperties(vertex *graph.Vertex, args ...string) (bool, map[string]interface{})

func (*Client) QueryProperty

func (mysql *Client) QueryProperty(q string) (bool, interface{})

func (*Client) QueryRows

func (mysql *Client) QueryRows(q string, params ...interface{}) (bool, *sql.Rows)

func (*Client) QuerySession

func (mysql *Client) QuerySession(q string, args ...interface{}) (bool, *graph.Session)

func (*Client) QueryState

func (mysql *Client) QueryState(in, out *graph.Vertex, predicate *graph.Predicate, state bool) bool

func (*Client) QueryTable

func (mysql *Client) QueryTable(tableName string) bool

func (*Client) QueryUser

func (mysql *Client) QueryUser(q string, args ...interface{}) (bool, *graph.User)

func (*Client) QueryVertex

func (mysql *Client) QueryVertex(uid int64) (bool, *graph.Vertex)

func (*Client) QueryVertexByX

func (mysql *Client) QueryVertexByX(x string, classes ...*graph.Class) (bool, *graph.Vertex)

func (*Client) QueryVertices

func (mysql *Client) QueryVertices(q string, args ...interface{}) (bool, []*graph.Vertex)

func (*Client) SearchClassProperties

func (mysql *Client) SearchClassProperties(class *graph.Class, propertyName, searchInput string) (bool, []*graph.PropertyExport)

func (*Client) SearchProperties

func (mysql *Client) SearchProperties(propertyName, searchInput string) (bool, []interface{})

func (*Client) SetDB

func (client *Client) SetDB(db *graph.Database)

func (*Client) Table

func (client *Client) Table(id string) string

func (*Client) Traverse

func (mysql *Client) Traverse(in int64, predicate *graph.Predicate, phase, export bool, limit int64) (bool, []*graph.Vertex)

func (*Client) TraverseCount

func (mysql *Client) TraverseCount(in int64, predicate *graph.Predicate, phase bool) int64

func (*Client) TraverseEdges

func (mysql *Client) TraverseEdges(in int64, predicate *graph.Predicate, phase bool, limit int64) (bool, []*graph.Link)

type Credentials

type Credentials struct {
	ProjectId  string
	Connection string
	Database   string
	Username   string
	Password   string
}

func (*Credentials) DatabaseName

func (credentials *Credentials) DatabaseName() string

func (*Credentials) ProjectID

func (credentials *Credentials) ProjectID() string

func (*Credentials) ServiceName

func (credentials *Credentials) ServiceName() string

Jump to

Keyboard shortcuts

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