loopbackio / loopbackio/loopback-next
Better docs for Repository.execute
@hacksparrow ci sta già lavorando.
Dal 15/9/2020.
- Lingua principale
- TypeScript
- Stelle
- 5.1k
- Fork
- 1.1k
- Merge medio
- 2g 21h
- PR unite (30g)
- 27
Descrizione
I noticed that we don't have a good documentation on how to use Repository.execute method. The API docs is very vague:
/**
* Execute a query with the given parameter object or an array of parameters
* @param command - The query string or command object
* @param parameters - The object with name/value pairs or an array of parameter
* values
* @param options - Options
*/
Let's improve the docs to show examples how to use execute for SQL databases using parameterized queries (to avoid SQL injection attacks).
If https://github.com/strongloop/loopback-next/issues/3342 is not implemented yet, then add a mention about NoSQL flavors not being supported yet, link to that GitHub issue and update it's acceptance criteria to request a MongoDB example to be added to the API docs. If the issue is already implemented, then
Add a MongoDB example as part of this story.
Prior work:
Acceptance criteria
- Add proper API docs for
Repository.execute, details see ^. - Update the https://github.com/strongloop/loopback-next/issues/3342 acceptance criteria to include an example for MongoDB.
Guida per i contributori
Apri 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.
Valutazione
Questa issue non è ancora stata valutata.