cassandra

package
v0.0.0-...-2df506a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2016 License: MIT Imports: 7 Imported by: 0

README

Cassandra Driver

Usage

sqltractor-cli -url cassandra://host:port/keyspace -path ./db/migrations create add_field_to_table
sqltractor-cli -url cassandra://host:port/keyspace -path ./db/migrations up
sqltractor-cli help # for more info

Authors

Documentation

Overview

Package cassandra implements the Driver interface.

Index

Constants

View Source
const (
	TABLE_NAME  = "schema_migrations"
	LOCK_TABLE  = "schema_migrations_lock"
	VERSION_ROW = 1
)
View Source
const (
	UP   counterStmt = true
	DOWN counterStmt = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

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

func FromSession

func FromSession(session *gocql.Session) *Driver

func New

func New(url string) *Driver

Cassandra Driver URL format: cassandra://host:port/keyspace

Example: cassandra://localhost/SpaceOfKeys

func (*Driver) Close

func (driver *Driver) Close() error

func (*Driver) Initialize

func (driver *Driver) Initialize() error

func (*Driver) Lock

func (driver *Driver) Lock() error

func (*Driver) Migrate

func (driver *Driver) Migrate(f *file.File) error

func (*Driver) Release

func (driver *Driver) Release() error

func (*Driver) Version

func (driver *Driver) Version() (uint64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL