Documentation
¶
Index ¶
- func FetchColumns(ctx context.Context, conn Querier, tableName string) ([]*pb.ColumnSchema, error)
- func FetchRowSet(ctx context.Context, conn Querier, metadataCacheKey, tableName string, ...) (*pb.RowSet, error)
- func FetchSchemas(ctx context.Context, conn Querier) ([]string, error)
- func FetchTableNames(ctx context.Context, conn Querier, schema string) ([]string, error)
- func FilterLimit(limit int) filterOption
- type PrimaryKeyAndValue
- type PrimaryKeysAndValues
- type Querier
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchColumns ¶ added in v0.8.0
FetchColumns returns a list of column schemas for a public tablename.
func FetchRowSet ¶
func FetchRowSet(ctx context.Context, conn Querier, metadataCacheKey, tableName string, pkv PrimaryKeysAndValues) (*pb.RowSet, error)
FetchObjects returns a protobuf RowSet for the given list primary key values.
func FetchSchemas ¶ added in v0.13.0
func FetchTableNames ¶ added in v0.8.0
FetchTablenames returns a list of public tablenames.
func FilterLimit ¶
func FilterLimit(limit int) filterOption
Types ¶
type PrimaryKeyAndValue ¶ added in v0.11.0
func NewPrimaryKeyAndValue ¶ added in v0.11.0
func NewPrimaryKeyAndValue(column string, value any) PrimaryKeyAndValue
NewPrimaryKeyAndValue creates a parameter object.
type PrimaryKeysAndValues ¶ added in v0.11.0
type PrimaryKeysAndValues struct {
// contains filtered or unexported fields
}
PrimaryKeysAndValues is a parameter object holding the column name(s) and one or more values.
func NewPrimaryKeyAndValues ¶ added in v0.11.0
func NewPrimaryKeyAndValues(column string, value ...any) PrimaryKeysAndValues
NewPrimaryKeyAndValues creates a parameter object.
func NewPrimaryKeysAndValues ¶ added in v0.11.0
func NewPrimaryKeysAndValues(pairs []PrimaryKeyAndValue) PrimaryKeysAndValues
MewPrimaryKeysAndValues creates a parameter object.
type Querier ¶
Querier is the interface that is used from a database connection. Known implementations are *pgx.Conn and *pgx.Tx and *pgxpool.Conn.
type Record ¶ added in v0.16.0
Record represents a Table row as a Map.
func FetchRecords ¶ added in v0.16.0
func FetchRecords(ctx context.Context, conn Querier, metadataCacheKey, tableName string, pkv PrimaryKeysAndValues) ([]Record, error)
FetchRecords returns a list of Objects (generic maps) for the given list primary key values.