ddltable

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

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

Go to latest
Published: Feb 24, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

README

DDLTable

Object DDL for unit testing

Why DDL Table

Main reason is easy prototyping for unit testing.

Limitations

Only simple primitives suported.

Tags

    _TagPK                 = "pk"
    _TagIndexName          = "index"
    _TagIndexUnique        = "indexunique"
    _TagRequired           = "required"
    _TagDefault            = "default"
    _TagOverrideColumnName = "columnname"
    _TagOverrideTableName  = "tablename"
    _TagOverrideOrder      = "order"

Documentation

Index

Constants

View Source
const (
	RootTagName = "hera"
)

Variables

This section is empty.

Functions

func High

func High[T comparable](slice []T) T

func Pop

func Pop[T comparable](slice []T) []T

Types

type Migration

type Migration struct {
	Up   string
	Down string
}

func (Migration) String

func (m Migration) String() string

type Table

type Table struct {
	Name string

	MigrationTable   *Migration
	MigrationIndexes *Migration
	// contains filtered or unexported fields
}

func NewTable

func NewTable(rootTagName string, object any) (*Table, error)

Jump to

Keyboard shortcuts

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