Place a query fingerprint in a comment at the start of each query
I maintainer di solito rispondono entro 4 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 32/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- backend, databases, developer-experience
Direzione di ricerca
The request is to have sqlx prefix every query with a comment containing a hash of the query string so tools like RDS can identify it, and so .sqlx/query-*.json can be searched for that hash. Start from how compile-time query macros and the query cache emit SQL, then decide where a fingerprint comment can be injected without breaking existing stored query documents. Done means generated SQL starts with that comment and the json artifacts update accordingly; this is a breaking change for those files.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I have found these related issues/pull requests
I don't see any related issues or pull requests.
Description
I'm finding that various DB performance tools don't show me the whole query. In particular, this is true for RDS. This makes it hard to identify which query is slow. To help this, we've manually injected a uuid in a comment on all queries:
sqlx::query_scalar!(
r#"
-- 935300b8-3def-431f-8480-8ae8e034fb0a
SELECT
customer.name
...
This seems fine in the sense that it solves the problem, but the diff to apply it was hefty and tedious (+4,261 -3,752).
Prefered solution
Instead, I'd love for sqlx to automatically inject an identifying hash (for example, the hash of the query string) as a comment prefix. This would let us search .sqlx/query-*.json for the matching hash and conclusively identify the query.
Is this a breaking change? Why or why not?
It will cause all the pregenerated / stored .json query documents to change.
- Lingua principale
- Rust
- Stelle
- 17.5k
- Fork
- 1.7k
- Merge medio
- 3g 17h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di transact-rs/sqlx
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
transact-rs/sqlx#4482 ·
I maintainer di solito rispondono entro 4 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
transact-rs/sqlx#4466 ·
I maintainer di solito rispondono entro 4 giorni
-
MySQL: ENUM and SET columns with a binary collation are named BINARY or CHARForse già presa @CodeMasterXZT l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transact-rs/sqlx#4453 ·
I maintainer di solito rispondono entro 4 giorni
-
Postgres text arrays: a quoted "NULL" element is decoded as SQL NULLForse già presa @MinJaeRun l’ha presa 3 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transact-rs/sqlx#4452 ·
I maintainer di solito rispondono entro 4 giorni
-
Fetch stream ends after first error using query macrosForse già presa @barry3406 l’ha presa 203 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
transact-rs/sqlx#4126 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
Tutte le issue di transact-rs/sqlx
Issue simili
-
area: library data-loss type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
alplabai/signex#1740 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
test(fslc): the unreadable mutate catalog test pins the Unix I/O error text and fails on WindowsForse già presa @rizumita l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
ServerProperties defaults white-list to true, so a fresh --dedicated server silently locks itselfAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
horizon-rust/horizon#3888 ·
I maintainer di solito rispondono entro 1 giorno
-
refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno