Skip to content

CachingSession does not allow using SKIP_METADATA #1178

Open
@wprzytula

Description

@wprzytula

Problem statement

As CachingSession manages preparation internally, it does not expose its PreparedStatements in any way. Therefore, it's not possible for a user of CachingSession to call PreparedStatement::set_use_cached_result_metadata in order to take advantage of that optimisation.

There are use cases when not having possibility to turn the optimisation on may result in significant inefficiency. As an example, the experimental NodeJS-over-Rust driver's API suits CachingSession's API best, but lack of the mentioned optimisation makes the experimental driver fall short compared to the original NodeJS driver (which, most likely, has the optimisation turned on).

Possible solution

Expose a way to set up CachingSession so that it turns the optimisation on for all PreparedStatements it manages.
Of course, write a big BEWARE disclaimer mentioning what are the possible pitfalls when using the optimisation (SELECT *, etc.).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions