Cache prepared statements by query

Description

Currently the client application is responsible of not preparing the same query twice.

When the user re-prepares an already prepared query, the user should get the existing prepared statement.

This might be a breaking change for existing users, so we should implement it in a major version (see internal debate for more info).

Environment

None

Pull Requests

None

Assignee

Unassigned

Reporter

Jorge Bay Gondra

Fix versions

Labels

None

PM Priority

C

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Sprint

Py P-MAJOR-NEXT

Priority

Major