oracle_test

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOracleConfig

func GetOracleConfig() neat.DBConfig

GetOracleConfig returns an Oracle connection config from environment variables

func SetupOracleConnection

func SetupOracleConnection(t *testing.T) *database.Database

SetupOracleConnection creates a database connection without setting up tables

func SetupOracleTest

func SetupOracleTest(t *testing.T) *database.Database

SetupOracleTest creates a database connection and sets up test tables for Oracle

func SetupTestDB

func SetupTestDB(config neat.DBConfig) (*database.Database, error)

SetupTestDB creates a database connection and sets up test tables

func TeardownTestDB

func TeardownTestDB(db *database.Database) error

TeardownTestDB drops test tables and closes the connection

Types

type TestModel

type TestModel struct {
	ID        uint      `db:"id"`
	Name      string    `db:"name"`
	Email     string    `db:"email"`
	Age       int       `db:"age"`
	Active    bool      `db:"active"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

TestModel is a simple model for integration testing

func (TestModel) TableName

func (TestModel) TableName() string

Jump to

Keyboard shortcuts

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