Documentation ¶
Overview ¶
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
* Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License.
Index ¶
- Constants
- func GetReady(db *sql.DB, graphName string) (bool, error)
- func IsEntity(v interface{}) bool
- type AGErrorListener
- type AGMapper
- type AGUnmarshaler
- type Age
- type AgeError
- type AgeParseError
- type AgeTx
- type Cursor
- type CursorProvider
- type CypherCursor
- type CypherMapCursor
- type Edge
- type Entity
- type GTYPE
- type LabeledEntity
- type MapPath
- type MapperVisitor
- func (v *MapperVisitor) PutType(label string, tp reflect.Type)
- func (v *MapperVisitor) VisitAgeout(ctx *parser.AgeoutContext) interface{}
- func (v *MapperVisitor) VisitChildren(node antlr.RuleNode) interface{}
- func (v *MapperVisitor) VisitEdge(ctx *parser.EdgeContext) interface{}
- func (v *MapperVisitor) VisitPath(ctx *parser.PathContext) interface{}
- func (v *MapperVisitor) VisitVertex(ctx *parser.VertexContext) interface{}
- type Path
- type SimpleEntity
- func (e *SimpleEntity) AsArr() []interface{}
- func (e *SimpleEntity) AsBigFloat() *big.Float
- func (e *SimpleEntity) AsBigInt() *big.Int
- func (e *SimpleEntity) AsBool() bool
- func (e *SimpleEntity) AsFloat() float64
- func (e *SimpleEntity) AsInt() int
- func (e *SimpleEntity) AsInt64() int64
- func (e *SimpleEntity) AsMap() map[string]interface{}
- func (e *SimpleEntity) AsStr() string
- func (e *SimpleEntity) GType() GTYPE
- func (e *SimpleEntity) IsNull() bool
- func (e *SimpleEntity) String() string
- func (e *SimpleEntity) Value() interface{}
- type UnmarshalVisitor
- func (v *UnmarshalVisitor) Visit(tree antlr.ParseTree) interface{}
- func (v *UnmarshalVisitor) VisitAgeout(ctx *parser.AgeoutContext) interface{}
- func (v *UnmarshalVisitor) VisitArr(ctx *parser.ArrContext) interface{}
- func (v *UnmarshalVisitor) VisitChildren(node antlr.RuleNode) interface{}
- func (v *UnmarshalVisitor) VisitEdge(ctx *parser.EdgeContext) interface{}
- func (v *UnmarshalVisitor) VisitErrorNode(node antlr.ErrorNode) interface{}
- func (v *UnmarshalVisitor) VisitPair(ctx *parser.PairContext) interface{}
- func (v *UnmarshalVisitor) VisitPath(ctx *parser.PathContext) interface{}
- func (v *UnmarshalVisitor) VisitProperties(ctx *parser.PropertiesContext) interface{}
- func (v *UnmarshalVisitor) VisitTerminal(node antlr.TerminalNode) interface{}
- func (v *UnmarshalVisitor) VisitValue(ctx *parser.ValueContext) interface{}
- func (v *UnmarshalVisitor) VisitVertex(ctx *parser.VertexContext) interface{}
- type Unmarshaller
- type Vertex
Constants ¶
const MaxInt = int(MaxUint >> 1)
const MaxUint = ^uint(0)
const MinInt = -MaxInt - 1
const MinUint = 0
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AGErrorListener ¶
type AGErrorListener struct { *antlr.DefaultErrorListener // contains filtered or unexported fields }
func NewAGErrorListener ¶
func NewAGErrorListener() *AGErrorListener
func (*AGErrorListener) SyntaxError ¶
func (el *AGErrorListener) SyntaxError(recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException)
type AGMapper ¶
type AGMapper struct {
AGUnmarshaler
}
type AGUnmarshaler ¶
type AGUnmarshaler struct { Unmarshaller // contains filtered or unexported fields }
func NewAGUnmarshaler ¶
func NewAGUnmarshaler() *AGUnmarshaler
type Age ¶
type Age struct {
// contains filtered or unexported fields
}
func ConnectAge ¶
* @param dsn host=127.0.0.1 port=5432 dbname=postgres user=postgres password=agens sslmode=disable
type AgeParseError ¶
type AgeParseError struct {
// contains filtered or unexported fields
}
func (*AgeParseError) Error ¶
func (e *AgeParseError) Error() string
type AgeTx ¶
type AgeTx struct {
// contains filtered or unexported fields
}
func (*AgeTx) ExecCypher ¶
func (a *AgeTx) ExecCypher(columnCount int, cypher string, args ...interface{}) (*CypherCursor, error)
* CREATE , DROP ....
func (*AgeTx) ExecCypherMap ¶
func (a *AgeTx) ExecCypherMap(columnCount int, cypher string, args ...interface{}) (*CypherMapCursor, error)
type CypherCursor ¶
type CypherCursor struct { Cursor // contains filtered or unexported fields }
func ExecCypher ¶
func ExecCypher(tx *sql.Tx, graphName string, columnCount int, cypher string, args ...interface{}) (*CypherCursor, error)
ExecCypher : execute cypher query CREATE , DROP .... MATCH .... RETURN .... CREATE , DROP .... RETURN ...
func (*CypherCursor) Close ¶
func (c *CypherCursor) Close() error
func (*CypherCursor) GetRow ¶
func (c *CypherCursor) GetRow() ([]Entity, error)
func (*CypherCursor) Next ¶
func (c *CypherCursor) Next() bool
type CypherMapCursor ¶
type CypherMapCursor struct { CypherCursor // contains filtered or unexported fields }
func ExecCypherMap ¶
func ExecCypherMap(tx *sql.Tx, graphName string, columnCount int, cypher string, args ...interface{}) (*CypherMapCursor, error)
ExecCypherMap CREATE , DROP .... MATCH .... RETURN .... CREATE , DROP .... RETURN ...
func (*CypherMapCursor) GetRow ¶
func (c *CypherMapCursor) GetRow() ([]interface{}, error)
type Edge ¶
type Edge struct { *LabeledEntity // contains filtered or unexported fields }
type Entity ¶
Entity object interface for parsed AGE result data : Vertex, Edge, Path and SimpleEntity
type GTYPE ¶
type GTYPE uint8
GTYPE representing entity types for AGE result data : Vertex, Edge, Path and SimpleEntity
type LabeledEntity ¶
type LabeledEntity struct { Entity // contains filtered or unexported fields }
func (*LabeledEntity) Id ¶
func (n *LabeledEntity) Id() int64
func (*LabeledEntity) Label ¶
func (n *LabeledEntity) Label() string
func (*LabeledEntity) Prop ¶
func (n *LabeledEntity) Prop(key string) interface{}
func (*LabeledEntity) Props ¶
func (n *LabeledEntity) Props() map[string]interface{}
return properties
type MapPath ¶
type MapPath struct { Entity // contains filtered or unexported fields }
func NewMapPath ¶
func NewMapPath(entities []interface{}) *MapPath
type MapperVisitor ¶
type MapperVisitor struct { UnmarshalVisitor // contains filtered or unexported fields }
func (*MapperVisitor) VisitAgeout ¶
func (v *MapperVisitor) VisitAgeout(ctx *parser.AgeoutContext) interface{}
func (*MapperVisitor) VisitChildren ¶
func (v *MapperVisitor) VisitChildren(node antlr.RuleNode) interface{}
func (*MapperVisitor) VisitEdge ¶
func (v *MapperVisitor) VisitEdge(ctx *parser.EdgeContext) interface{}
Visit a parse tree produced by AgeParser#edge.
func (*MapperVisitor) VisitPath ¶
func (v *MapperVisitor) VisitPath(ctx *parser.PathContext) interface{}
func (*MapperVisitor) VisitVertex ¶
func (v *MapperVisitor) VisitVertex(ctx *parser.VertexContext) interface{}
type Path ¶
type Path struct { Entity // contains filtered or unexported fields }
func (*Path) GetAsVertex ¶
type SimpleEntity ¶
type SimpleEntity struct { Entity // contains filtered or unexported fields }
func NewSimpleEntity ¶
func NewSimpleEntity(value interface{}) *SimpleEntity
func (*SimpleEntity) AsArr ¶
func (e *SimpleEntity) AsArr() []interface{}
func (*SimpleEntity) AsBigFloat ¶
func (e *SimpleEntity) AsBigFloat() *big.Float
func (*SimpleEntity) AsBigInt ¶
func (e *SimpleEntity) AsBigInt() *big.Int
func (*SimpleEntity) AsBool ¶
func (e *SimpleEntity) AsBool() bool
func (*SimpleEntity) AsFloat ¶
func (e *SimpleEntity) AsFloat() float64
func (*SimpleEntity) AsInt ¶
func (e *SimpleEntity) AsInt() int
func (*SimpleEntity) AsInt64 ¶
func (e *SimpleEntity) AsInt64() int64
func (*SimpleEntity) AsMap ¶
func (e *SimpleEntity) AsMap() map[string]interface{}
func (*SimpleEntity) AsStr ¶
func (e *SimpleEntity) AsStr() string
func (*SimpleEntity) GType ¶
func (e *SimpleEntity) GType() GTYPE
func (*SimpleEntity) IsNull ¶
func (e *SimpleEntity) IsNull() bool
func (*SimpleEntity) String ¶
func (e *SimpleEntity) String() string
func (*SimpleEntity) Value ¶
func (e *SimpleEntity) Value() interface{}
type UnmarshalVisitor ¶
type UnmarshalVisitor struct { parser.AgeVisitor // contains filtered or unexported fields }
func (*UnmarshalVisitor) Visit ¶
func (v *UnmarshalVisitor) Visit(tree antlr.ParseTree) interface{}
func (*UnmarshalVisitor) VisitAgeout ¶
func (v *UnmarshalVisitor) VisitAgeout(ctx *parser.AgeoutContext) interface{}
func (*UnmarshalVisitor) VisitArr ¶
func (v *UnmarshalVisitor) VisitArr(ctx *parser.ArrContext) interface{}
Visit a parse tree produced by AgeParser#arr.
func (*UnmarshalVisitor) VisitChildren ¶
func (v *UnmarshalVisitor) VisitChildren(node antlr.RuleNode) interface{}
func (*UnmarshalVisitor) VisitEdge ¶
func (v *UnmarshalVisitor) VisitEdge(ctx *parser.EdgeContext) interface{}
Visit a parse tree produced by AgeParser#edge.
func (*UnmarshalVisitor) VisitErrorNode ¶
func (v *UnmarshalVisitor) VisitErrorNode(node antlr.ErrorNode) interface{}
func (*UnmarshalVisitor) VisitPair ¶
func (v *UnmarshalVisitor) VisitPair(ctx *parser.PairContext) interface{}
Visit a parse tree produced by AgeParser#pair.
func (*UnmarshalVisitor) VisitPath ¶
func (v *UnmarshalVisitor) VisitPath(ctx *parser.PathContext) interface{}
Visit a parse tree produced by AgeParser#path.
func (*UnmarshalVisitor) VisitProperties ¶
func (v *UnmarshalVisitor) VisitProperties(ctx *parser.PropertiesContext) interface{}
Visit a parse tree produced by AgeParser#properties.
func (*UnmarshalVisitor) VisitTerminal ¶
func (v *UnmarshalVisitor) VisitTerminal(node antlr.TerminalNode) interface{}
func (*UnmarshalVisitor) VisitValue ¶
func (v *UnmarshalVisitor) VisitValue(ctx *parser.ValueContext) interface{}
Visit a parse tree produced by AgeParser#value.
func (*UnmarshalVisitor) VisitVertex ¶
func (v *UnmarshalVisitor) VisitVertex(ctx *parser.VertexContext) interface{}
Visit a parse tree produced by AgeParser#vertex.
type Unmarshaller ¶
type Unmarshaller interface {
// contains filtered or unexported methods
}