database

package
v0.0.0-...-38a7862 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDBConn

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

func (*MongoDBConn) Close

func (c *MongoDBConn) Close() error

func (*MongoDBConn) GetClient

func (c *MongoDBConn) GetClient() any

func (*MongoDBConn) GetContext

func (c *MongoDBConn) GetContext() *context.Context

func (*MongoDBConn) GetDatabase

func (c *MongoDBConn) GetDatabase(name string) any

func (*MongoDBConn) Open

func (c *MongoDBConn) Open() error

type NoSQLConn

type NoSQLConn interface {
	Open() error
	GetClient() any
	GetDatabase(name string) any
	GetContext() *context.Context
	Close() error
}

func NewMongoDBConn

func NewMongoDBConn(uri string) NoSQLConn

type PostgreSQLConn

type PostgreSQLConn struct {
	DSN string
	// contains filtered or unexported fields
}

func (*PostgreSQLConn) Close

func (c *PostgreSQLConn) Close() error

func (*PostgreSQLConn) GetDatabase

func (c *PostgreSQLConn) GetDatabase() *sql.DB

func (*PostgreSQLConn) Open

func (c *PostgreSQLConn) Open() error

type SQLConn

type SQLConn interface {
	Open() error
	GetDatabase() *sql.DB
	Close() error
}

func NewPostgreSQLConn

func NewPostgreSQLConn(dsn string) SQLConn

Jump to

Keyboard shortcuts

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