userver: storages::mysql::CommandControl Struct Reference
Loading...
Searching...
No Matches
storages::mysql::CommandControl Struct Referencefinal

#include </data/code/userver/mysql/include/userver/storages/mysql/options.hpp>

Detailed Description

A structure to control timeouts for MySQL queries

There is a single parameter, execute, which limits the overall time the driver spends executing a query, which includes:

  • connecting to MySQL server, if there are no connections available and connection pool still has space for new connections;
  • waiting for a connection to become idle if there are no idle connections and connection pool already has reached its max size;
  • preparing the statement, if it's absent in statements cache;
  • executing the statement;
  • fetching all the statement results, if any, and not in cursor mode.

In case of a timeout the client gets an exception and the driver drops the connection (no further reuse will take place), otherwise the connection is returned to the pool.

Definition at line 29 of file options.hpp.

Public Attributes

TimeoutDuration execute {}
 Overall timeout for a statement being executed.
 

Member Data Documentation

◆ execute

TimeoutDuration storages::mysql::CommandControl::execute {}

Overall timeout for a statement being executed.

Definition at line 31 of file options.hpp.


The documentation for this struct was generated from the following file: