Documentation ¶
Index ¶
- func BuildPostgresConnStr(host string, port uint, user, password, dbname, sslmode string) (string, error)
- func CreatePostgresDatabase(host string, port uint, user, password, dbname, sslmode string) error
- func DirScan(baseDir string, fileGlob string) ([]string, error)
- func MergeMaps(x1, x2 interface{}) interface{}
- func RandomPort() string
- func RandomString(n int) string
- func StreamBatch(stream <-chan *gdbi.GraphElement, batchSize int, graph string, ...) error
- func StreamEdgesFromFile(file string, workers int) (chan *gripql.Edge, error)
- func StreamLines(file string, chanSize int) (chan string, error)
- func StreamVerticesFromFile(file string, workers int) (chan *gripql.Vertex, error)
- func UUID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPostgresConnStr ¶
func CreatePostgresDatabase ¶
CreatePosgresDatabase creates a postgres database
func MergeMaps ¶
func MergeMaps(x1, x2 interface{}) interface{}
MergeMaps deeply merges two schema maps
func RandomPort ¶
func RandomPort() string
RandomPort returns a random port string between 10000 and 20000.
func RandomString ¶
RandomString generates a random string of length n.
func StreamBatch ¶
func StreamBatch(stream <-chan *gdbi.GraphElement, batchSize int, graph string, vertexAdd func([]*gdbi.Vertex) error, edgeAdd func([]*gdbi.Edge) error) error
StreamBatch a stream of inputs and loads them into the graph This function assumes incoming stream is GraphElemnts from a single graph
func StreamEdgesFromFile ¶
StreamEdgesFromFile reads a file containing an edge per line and streams gripql.Edge objects on a channel
func StreamLines ¶
StreamLines returns a channel of lines from a file.
func StreamVerticesFromFile ¶
StreamVerticesFromFile reads a file containing a vertex per line and streams *gripql.Vertex objects out on a channel
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.