Commit Graph

5 Commits

Author SHA1 Message Date
Charis 62d59d596b convert advisor and auth queries in pgmeta to safesql (#44998)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Improved SQL construction across the studio to make queries safer and
more consistent.
* Safer parameter handling for optional schema and remediation links to
prevent injection risks.
* Deterministic query header formatting and stable date/comments in
generated SQL.
* More robust user-count and paginated-user queries for accurate counts,
sorting and pagination.
  * Updated tests to align with the new safe query handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-20 11:34:00 -04:00
Joshen Lim 98b1b79909 Chore/shift manual queries into pg meta 04 (#43956)
## Context

Shifts all remaining dashboard queries into pg-meta so that we
centralize all manually written queries in one place
Having them in packages/pg-meta also allows us to write tests for them

## To test

Just needs a smoke test on
- Role Impersonation
- Lints
- Data API
- Database
  - Enumerated Types
- Integrations
  - Foreign Data Wrappers
  - Vault
2026-03-24 16:23:13 +08:00
Joshen Lim fc7fb50aa2 Organize pg meta queries for studio (#43562)
## Context

We reached to a consensus that we'll keep manually written queries
within the `pg-meta` package

I'll shift queries over in several PRs but wanted to double check if the
changes here is a good folder structure

## Changes involved

- Am organizing dashboard queries in `pg-meta` based on product
  - So folder structure will be `/sql/studio/[product]/*.ts`
- Every constant will be exported directly from `pg-meta`'s index
- So consumption in dashboard will just be `import { xxx } from
'@supabase/pg-meta`

cc @avallete and @soedirgo on this one - lemme know if this is alright,
or if there's a preferred way to do this
2026-03-10 09:34:11 +07:00
Ivan Vasilov 1cd1ebfc7f chire: Sort imports in all packages, cms, design-system and ui-library apps (#41610)
Sorted all imports in all packages, `cms`, `design-system` and
`ui-library` apps by running `pnpm format` on them.

All changes in this PR are done by the script.
2026-02-05 13:54:10 +01:00
Ali Waseem 7682bac0f3 Fix: Updated to use optimized search columns when getting user counts (#40107)
* Updated to use optimized search columns when getting user counts

* added unit tests for query builders

* minor

* Nit fix keywords URL param not getting loaded into search input field

* removed user footer

* updated tests for upstream

* updated integration tests

* updated tests to be int for paginated

* updated schema

* updated types

* updated type imports

* updated type imports

* Apply suggestion from @avallete

Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>

* updated literal import

* refactor: use common escaping (#40186)

refactor: use utils for sql escaping

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Andrew Valleteau <avallete@users.noreply.github.com>
2025-11-06 15:32:34 +08:00