Skip to content

Commit

Permalink
feat(core): fix up where conditions in postgres
Browse files Browse the repository at this point in the history
feat(frontend): fix up apollo client in explore storage unit
  • Loading branch information
hkdeman committed Aug 27, 2024
1 parent b536b0d commit 0b4a17c
Show file tree
Hide file tree
Showing 5 changed files with 6,594 additions and 9,061 deletions.
2 changes: 1 addition & 1 deletion core/graph/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion core/src/plugins/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,11 @@ func (p *PostgresPlugin) GetRows(config *engine.PluginConfig, schema string, sto
return nil, err
}
quotedKeys := common.JoinWithQuotes(sortKeyRes)
query := fmt.Sprintf("SELECT * FROM \"%v\".\"%s\" order by %v asc", schema, storageUnit, quotedKeys)
query := fmt.Sprintf("SELECT * FROM \"%v\".\"%s\"", schema, storageUnit)
if len(where) > 0 {
query = fmt.Sprintf("%v WHERE %v", query, where)
}
query = fmt.Sprintf("%v ORDER BY %v ASC", query, quotedKeys)
query = fmt.Sprintf("%v LIMIT ? OFFSET ?", query)
return p.executeRawSQL(config, query, pageSize, pageOffset)
}
Expand Down
Loading

0 comments on commit 0b4a17c

Please sign in to comment.