data

package
v0.0.0-...-757bef6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StmntLoadUsersTable = "CREATE TABLE users AS select id, account_id, email, department, " +
		"created_date, first_name, last_name, account_status, active_package_name, account_record_type " +
		"from read_parquet('%s') "
	QryAllUsers      = "SELECT id, account_id, email, department, created_date FROM users limit 100;"
	QryUsersByDomain = "SELECT id, account_id, email, department, created_date FROM users WHERE email LIKE ?"
	QryUsersByEmail  = "SELECT id, account_id, email, department, created_date FROM users WHERE email = ?"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DAO

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

func NewStore

func NewStore(driver DataDriver) *DAO

func (*DAO) GetUsers

func (s *DAO) GetUsers() ([]*model.User, error)

func (*DAO) GetUsersByEmail

func (d *DAO) GetUsersByEmail(email string) ([]*model.User, error)

func (*DAO) GetUsersByEmailDomain

func (s *DAO) GetUsersByEmailDomain(domain string) ([]*model.User, error)

type DataDriver

type DataDriver interface {
	Execute(string) error
	Query(string) (*sql.Rows, error)
	QueryPreparedStatement(string, string) (*sql.Rows, error)
	Close() error
}

type DuckDBDriver

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

func NewDuckDBDriver

func NewDuckDBDriver(awsCred aws.AWSCred) *DuckDBDriver

func (*DuckDBDriver) Close

func (d *DuckDBDriver) Close() error

func (*DuckDBDriver) Execute

func (d *DuckDBDriver) Execute(statement string) error

func (*DuckDBDriver) Query

func (d *DuckDBDriver) Query(statement string) (*sql.Rows, error)

func (*DuckDBDriver) QueryPreparedStatement

func (d *DuckDBDriver) QueryPreparedStatement(query string, v string) (*sql.Rows, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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