...

Package neo4j

import "github.com/golang-migrate/migrate/v4/database/neo4j"
Overview
Index

Overview ▾

Constants

const DefaultMigrationsLabel = "SchemaMigration"

Variables

var (
    StatementSeparator           = []byte(";")
    DefaultMultiStatementMaxSize = 10 * 1 << 20 // 10 MB
)
var (
    ErrNilConfig = fmt.Errorf("no config")
)

func WithInstance

func WithInstance(driver neo4j.Driver, config *Config) (database.Driver, error)

type Config

type Config struct {
    MigrationsLabel       string
    MultiStatement        bool
    MultiStatementMaxSize int
}

type MigrationRecord

type MigrationRecord struct {
    Version int
    Dirty   bool
}

type Neo4j

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

func (*Neo4j) Close

func (n *Neo4j) Close() error

func (*Neo4j) Drop

func (n *Neo4j) Drop() (err error)

func (*Neo4j) Lock

func (n *Neo4j) Lock() error

local locking in order to pass tests, Neo doesn't support database locking

func (*Neo4j) Open

func (n *Neo4j) Open(url string) (database.Driver, error)

func (*Neo4j) Run

func (n *Neo4j) Run(migration io.Reader) (err error)

func (*Neo4j) SetVersion

func (n *Neo4j) SetVersion(version int, dirty bool) (err error)

func (*Neo4j) Unlock

func (n *Neo4j) Unlock() error

func (*Neo4j) Version

func (n *Neo4j) Version() (version int, dirty bool, err error)