{"modulePath":"github.com/getsynq/dwhsupport","version":"v0.28.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package postgres\n\n## Functions\n\n```go\nfunc IsAuthError(err error) bool\n```\nIsAuthError reports whether err is the server rejecting the login: a wrong password (28P01) or a role the server or pg\\_hba.conf does not let in (28000).\n\n```go\nfunc IsPermissionError(err error) bool\n```\nIsPermissionError reports whether err indicates the DWH credentials lack the privileges required for the attempted operation.\n\n```go\nfunc NewQuerier[T any](conn *PostgresExecutor) querier.Querier[T]\n```\n\n## Types\n\n```go\ntype Executor interface {\n\tQueryRows(ctx context.Context, q string, args ...interface{}) (*sqlx.Rows, error)\n}\n```\n\n```go\ntype PostgresConf struct {\n\tUser          string\n\tPassword      string\n\tDatabase      string\n\tHost          string\n\tPort          int\n\tAllowInsecure bool\n\tSSHTunnel     *sshtunnel.SshTunnel\n}\n```\n\n```go\ntype PostgresExecutor struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewPostgresExecutor(ctx context.Context, conf *PostgresConf) (*PostgresExecutor, error)\n```\n\n```go\nfunc (e *PostgresExecutor) Close() error\n```\n\n```go\nfunc (e *PostgresExecutor) Exec(ctx context.Context, query string, args ...any) error\n```\n\n```go\nfunc (e *PostgresExecutor) GetDb() *sqlx.DB\n```\n\n```go\nfunc (e *PostgresExecutor) QueryRows(ctx context.Context, sql string, args ...interface{}) (*sqlx.Rows, error)\n```\n\n```go\nfunc (e *PostgresExecutor) Select(ctx context.Context, dest any, query string, args ...any) error\n```\n\n","path":"github.com/getsynq/dwhsupport/exec/postgres","name":"postgres","synopsis":"","isRedistributable":true}
