Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

any_connection::backslash_escapes
PrevUpHomeNext

Returns whether backslashes are being treated as escape sequences.

Synopsis
bool
backslash_escapes() const;
Description

By default, the server treats backslashes in string values as escape characters. This behavior can be disabled by activating the NO_BACKSLASH_ESCAPES SQL mode.

Every time an operation involving server communication completes, the server reports whether this mode was activated or not as part of the response. Connections store this information and make it available through this function.

  • If backslash are treated like escape characters, returns true.
  • If NO_BACKSLASH_ESCAPES has been activated, returns false.
  • If connection establishment hasn't happened yet, returns true.
  • Calling this function while an async operation that changes backslash behavior is outstanding may return true or false.

This function does not involve server communication.

Exception safety

No-throw guarantee.


PrevUpHomeNext