All Projects → spy16 → Fabric

spy16 / Fabric

Licence: mit
Fabric is a simple triplestore written in Golang

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Fabric

Boost graph cookbook 1
Boost.Graph Cookbook 1: Basics
Stars: ✭ 157 (-8.19%)
Mutual labels:  graph
Patches
Patches is a visual programming editor for building WebVR and WebGL experiences.
Stars: ✭ 164 (-4.09%)
Mutual labels:  graph
Relation Graph
Vue 关联关系图谱组件,可以展示如组织机构图谱、股权架构图谱、集团关系图谱等知识图谱,可提供多种图谱布局,包括树状布局、中心布局、力学布局自动布局等。Vue component for relationship graph , which can display knowledge graphs, such as organization graph, equity structure graph, group relationship graph,
Stars: ✭ 166 (-2.92%)
Mutual labels:  graph
Baklavajs
Graph / node editor in the browser using VueJS
Stars: ✭ 157 (-8.19%)
Mutual labels:  graph
Animatedgraph
Animated Graph which you can include in your application to show information in more attractive way
Stars: ✭ 162 (-5.26%)
Mutual labels:  graph
Algo Tree
Algo-Tree is a collection of Algorithms and data structures which are fundamentals to efficient code and good software design. Creating and designing excellent algorithms is required for being an exemplary programmer. It contains solutions in various languages such as C++, Python and Java.
Stars: ✭ 166 (-2.92%)
Mutual labels:  graph
Graphembedding
Implementation and experiments of graph embedding algorithms.
Stars: ✭ 2,461 (+1339.18%)
Mutual labels:  graph
Programming Languages Influence
Code to retrieve data for the programming languages influence visualizations from Freebase
Stars: ✭ 171 (+0%)
Mutual labels:  graph
Diagram Maker
A library to display an interactive editor for any graph-like data.
Stars: ✭ 2,086 (+1119.88%)
Mutual labels:  graph
Awesome Gnn Recommendation
Graph Neural Network
Stars: ✭ 168 (-1.75%)
Mutual labels:  graph
Neo4j 3d Force Graph
Experiments with Neo4j & 3d-force-graph https://github.com/vasturiano/3d-force-graph
Stars: ✭ 159 (-7.02%)
Mutual labels:  graph
Alga Paper
A minimalistic, elegant and powerful approach to working with graphs in a functional programming language
Stars: ✭ 163 (-4.68%)
Mutual labels:  graph
Cargo Deps
Cargo subcommand for building dependency graphs of Rust projects
Stars: ✭ 168 (-1.75%)
Mutual labels:  graph
Hgp Sl
Hierarchical Graph Pooling with Structure Learning
Stars: ✭ 159 (-7.02%)
Mutual labels:  graph
Libgrape Lite
🍇 A C++ library for parallel graph processing 🍇
Stars: ✭ 169 (-1.17%)
Mutual labels:  graph
Forceatlas2
Fastest Gephi's ForceAtlas2 graph layout algorithm implemented for Python and NetworkX
Stars: ✭ 154 (-9.94%)
Mutual labels:  graph
Blocks.js
JavaScript dataflow graph editor
Stars: ✭ 165 (-3.51%)
Mutual labels:  graph
Stateful
Finite state machine for Go
Stars: ✭ 172 (+0.58%)
Mutual labels:  graph
Amazon Sde Test Series
This repository includes all the interview preparation questions for Amazon SDE role
Stars: ✭ 167 (-2.34%)
Mutual labels:  graph
Dragon
Dragon: A Computation Graph Virtual Machine Based Deep Learning Framework.
Stars: ✭ 168 (-1.75%)
Mutual labels:  graph

WIP

Fabric

GoDoc Go Report Card

Fabric is a triple-store written in Go. Fabric provides simple functions and store options to deal with "Subject->Predicate->Object" relations or so called triples.

Usage

Get fabric by using go get -u github.com/spy16/fabric (Fabric as a library has no external dependencies)

mem := &fabric.InMemoryStore{}

fab := fabric.New(mem)

fab.Insert(context.Background(), fabric.Triple{
    Source: "Bob",
    Predicate: "Knows",
    Target: "John",
})

fab.Query(context.Background(), fabric.Query{
    Source: fabric.Clause{
        Type: "equal",
        Value: "Bob",
    },
})

To use a SQL database for storing the triples, use the following snippet:

db, err := sql.Open("sqlite3", "fabric.db")
if err != nil {
    panic(err)
}

store := &fabric.SQLStore{
    DB: db,
}
store.Setup(context.Background()) // to create required tables

fab := fabric.New(store)

Fabric SQLStore uses Go's standard database/sql package. So any SQL database supported through this interface (includes most major SQL databases) should work.

Additional store support can be added by implementing the Store interface.

type Store interface {
	Insert(ctx context.Context, tri Triple) error
	Query(ctx context.Context, q Query) ([]Triple, error)
	Delete(ctx context.Context, q Query) (int, error)
}

Optional Counter and ReWeighter can be implemented by the store implementations to support extended query options.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].