MCPcopy
hub / github.com/PeerDB-io/peerdb / GetRowsOnly

Method GetRowsOnly

flow/e2e/pg.go:211–221  ·  view source on GitHub ↗

to avoid fetching rows from "child" tables ala Postgres table inheritance

(ctx context.Context, suffix string, table string, cols string)

Source from the content-addressed store, hash-verified

209
210// to avoid fetching rows from "child" tables ala Postgres table inheritance
211func (s *PostgresSource) GetRowsOnly(ctx context.Context, suffix string, table string, cols string) (*model.QRecordBatch, error) {
212 pgQueryExecutor, err := s.PostgresConnector.NewQRepQueryExecutor(ctx, nil, shared.InternalVersion_Latest, "testflow", "testpart")
213 if err != nil {
214 return nil, err
215 }
216
217 return pgQueryExecutor.ExecuteAndProcessQuery(
218 ctx,
219 fmt.Sprintf(`SELECT %s FROM ONLY e2e_test_%s.%s ORDER BY id`, cols, suffix, common.QuoteIdentifier(table)),
220 )
221}
222
223func RevokePermissionForTableColumns(ctx context.Context, conn *pgx.Conn, tableIdentifier string, selectedColumns []string) error {
224 schemaTable, err := common.ParseTableIdentifier(tableIdentifier)

Callers 1

Calls 2

NewQRepQueryExecutorMethod · 0.80

Tested by

no test coverage detected