MCPcopy Create free account
hub / github.com/Shopify/ghostferry / DefaultBuildSelect

Function DefaultBuildSelect

cursor.go:307–315  ·  view source on GitHub ↗
(columns []string, table *TableSchema, lastPaginationKey PaginationKey, batchSize uint64)

Source from the content-addressed store, hash-verified

305}
306
307func DefaultBuildSelect(columns []string, table *TableSchema, lastPaginationKey PaginationKey, batchSize uint64) squirrel.SelectBuilder {
308 quotedPaginationKey := QuoteField(table.GetPaginationColumn().Name)
309
310 return squirrel.Select(columns...).
311 From(QuotedTableName(table)).
312 Where(squirrel.Gt{quotedPaginationKey: lastPaginationKey.SQLValue()}).
313 Limit(batchSize).
314 OrderBy(quotedPaginationKey)
315}

Callers 1

FetchMethod · 0.85

Calls 4

QuoteFieldFunction · 0.85
QuotedTableNameFunction · 0.85
GetPaginationColumnMethod · 0.80
SQLValueMethod · 0.65

Tested by

no test coverage detected