orientdb

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterToExpression added in v0.10.0

func FilterToExpression(f *filters.Filter, formatter func(string) string) string

Types

type ClassDefinition added in v0.10.0

type ClassDefinition struct {
	Name         string     `json:"name"`
	SuperClass   string     `json:"superClass,omitempty"`
	SuperClasses []string   `json:"superClasses,omitempty"`
	Abstract     bool       `json:"abstract"`
	StrictMode   bool       `json:"strictmode"`
	Alias        string     `json:"alias,omitempty"`
	Properties   []Property `json:"properties,omitempty"`
	Indexes      []Index    `json:"indexes,omitempty"`
}

type Client added in v0.10.0

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

func NewClient added in v0.10.0

func NewClient(url string, database string, username string, password string) (*Client, error)

func (*Client) AlterProperty added in v0.10.0

func (c *Client) AlterProperty(className string, prop Property) error

func (*Client) Connect added in v0.10.0

func (c *Client) Connect() error

func (*Client) CreateClass added in v0.10.0

func (c *Client) CreateClass(class ClassDefinition) error

func (*Client) CreateDatabase added in v0.10.0

func (c *Client) CreateDatabase() (Document, error)

func (*Client) CreateDocument added in v0.10.0

func (c *Client) CreateDocument(doc Document) (Document, error)

func (*Client) CreateDocumentClass added in v0.10.0

func (c *Client) CreateDocumentClass(class ClassDefinition) error

func (*Client) CreateIndex added in v0.10.0

func (c *Client) CreateIndex(className string, index Index) error

func (*Client) CreateProperty added in v0.10.0

func (c *Client) CreateProperty(className string, prop Property) error

func (*Client) DeleteDocument added in v0.10.0

func (c *Client) DeleteDocument(id string) error

func (*Client) DeleteDocumentClass added in v0.10.0

func (c *Client) DeleteDocumentClass(name string) error

func (*Client) GetDatabase added in v0.10.0

func (c *Client) GetDatabase() (Document, error)

func (*Client) GetDocument added in v0.10.0

func (c *Client) GetDocument(id string) (Document, error)

func (*Client) GetDocumentClass added in v0.10.0

func (c *Client) GetDocumentClass(name string) (*DocumentClass, error)

func (*Client) Query added in v0.10.0

func (c *Client) Query(obj string, query *filters.SearchQuery) ([]Document, error)

func (*Client) Request added in v0.10.0

func (c *Client) Request(method string, url string, body io.Reader) (*http.Response, error)

func (*Client) Sql added in v0.10.0

func (c *Client) Sql(query string) ([]Document, error)

func (*Client) Upsert added in v0.10.0

func (c *Client) Upsert(doc Document, key string) (Document, error)

type Document added in v0.10.0

type Document map[string]interface{}

type DocumentClass added in v0.10.0

type DocumentClass struct {
	Class ClassDefinition `json:"class"`
}

type Error added in v0.10.0

type Error struct {
	Code    int    `json:"code"`
	Reason  int    `json:"reason"`
	Content string `json:"content"`
}

type Errors added in v0.10.0

type Errors struct {
	Errors []Error `json:"errors"`
}

type Index added in v0.10.0

type Index struct {
	Name   string   `json:"name"`
	Type   string   `json:"type"`
	Fields []string `json:"fields"`
}

type Property added in v0.10.0

type Property struct {
	Name        string `json:"name,omitempty"`
	Type        string `json:"type,omitempty"`
	LinkedType  string `json:"linkedType,omitempty"`
	LinkedClass string `json:"linkedClass,omitempty"`
	Mandatory   bool   `json:"mandatory"`
	NotNull     bool   `json:"notNull"`
	ReadOnly    bool   `json:"readonly"`
	Collate     string `json:"collate,omitempty"`
	Regexp      string `json:"regexp,omitempty"`
}

type Result added in v0.10.0

type Result struct {
	Result []Document `json:"result"`
}

type Session added in v0.10.0

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

Source Files

  • client.go

Jump to

Keyboard shortcuts

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