sqlitediff

package module
v0.0.0-...-7422171 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2016 License: MIT Imports: 8 Imported by: 0

README

sqlitediff

go sqlite databases diff tool

Installation

go get github.com/vazrupe/sqlitediff

Usage

import (
    ...
    "github.com/vazrupe/sqlitediff"
    ...
)

...
d, err := sqlitediff.Diff(YOUR_BEFORE_DBNAME, YOUR_AFTER_DBNAME)
...

License

MIT Lisense.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiffDatabase

type DiffDatabase struct {
	ChanageTables map[string]DiffTable
	AddTables     []string
	RemoveTables  []string
}

DiffDatabase change database info

func Diff

func Diff(before, after string) (*DiffDatabase, error)

Diff returns Diff datas

type DiffTable

type DiffTable struct {
	Name string

	ChangeSchema bool
	BeforeSQL    string
	AfterSQL     string

	ChangeRows []int64
	AddRows    []int64
	RemoveRows []int64
}

DiffTable is one table's difference before and after rows RemoveRows is BeforeTable data

Jump to

Keyboard shortcuts

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