orientdb

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2016 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 ClassDefinition

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

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

func NewClient

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

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) CreateDatabase

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

func (*Client) CreateDocument

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

func (*Client) CreateDocumentClass

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

func (*Client) DeleteDocument

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

func (*Client) DeleteDocumentClass

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

func (*Client) GetDatabase

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

func (*Client) GetDocument

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

func (*Client) GetDocumentClass

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

func (*Client) Request

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

func (*Client) Sql

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

type Document

type Document map[string]interface{}

type DocumentClass

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

type Error

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

type Errors

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

type Index

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

type Property

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

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

type Session

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

Jump to

Keyboard shortcuts

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