mysqlStringLiteral static method

  1. @visibleForTesting
String mysqlStringLiteral(
  1. String value
)

value as a MySQL string literal (DBSQLAdapter.sqlStringLiteral with escapeBackslashes): MySQL's default sql_mode treats \ as an escape character in literals, so a \ must be escaped too (or \' would end the literal).

Implementation

@visibleForTesting
static String mysqlStringLiteral(String value) =>
    DBSQLAdapter.sqlStringLiteral(value, escapeBackslashes: true);