asserty

package
v0.6.0-prerelease Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

README

What is this?

Asserty is a package that provides a set of functions to help ensure that a database schema conforms to your expectations.

Sure, you could probably use it in tests. But our goal for this is to use it as part of service readiness checks. We want to make sure that the database schema is what we expect it to be before we start to serve traffic.

Documentation

Overview

Package asserty offers functionality to assert for certain DB properties.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

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

func LoadTable

func LoadTable(db *sql.DB, schema, tableName string) (*Table, error)

func (*Table) ContainsColumns

func (t *Table) ContainsColumns(columnNames ...string) error

func (*Table) ContainsIndexes

func (t *Table) ContainsIndexes(indexNames ...string) error

func (*Table) NotContainsColumns

func (t *Table) NotContainsColumns(columnNames ...string) error

func (*Table) NotContainsIndexes

func (t *Table) NotContainsIndexes(indexNames ...string) error

Jump to

Keyboard shortcuts

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