function NamedPlaceholderConverter::getAnsiSQLStringLiteralPattern

Helper to return a regex pattern from a delimiter character.

Parameters

string $delimiter: A delimiter character.

Return value

string The regex pattern.

1 call to NamedPlaceholderConverter::getAnsiSQLStringLiteralPattern()
NamedPlaceholderConverter::__construct in core/modules/mysqli/src/Driver/Database/mysqli/NamedPlaceholderConverter.php

File

core/modules/mysqli/src/Driver/Database/mysqli/NamedPlaceholderConverter.php, line 177

Class

NamedPlaceholderConverter
A class to convert a SQL statement with named placeholders to positional.

Namespace

Drupal\mysqli\Driver\Database\mysqli

Code

private function getAnsiSQLStringLiteralPattern(string $delimiter) : string {
  return $delimiter . '[^' . $delimiter . ']*' . $delimiter;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.