Skip to content

Better docs for Repository.execute #5264

@bajtos

Description

@bajtos

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 #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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions