Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL ...
func NewMySQLStore ¶
NewMySQLStore creates an instance of MySQLStore with the given connection string.
func (*MySQL) CreateSchema ¶
func (m *MySQL) CreateSchema()
CreateSchema bootstraps the initial database schema.
func (*MySQL) GetNodes ¶
GetNodes returns all the nodes. Intrensic info of a node is persisted in 'nodes' table. And the parent child relation is persisted in 'parents' table. First fetch all the info of the nodes. Then fetch all the info of parent child relation. Create child list for each node from that parent child relation. Return error at any point and avoid transaction.
func (*MySQL) InsertNode ¶
InsertNode creates a graph node with it's parent child relationship into the datastore. Operations are done within a transaction to maintain data consistency.