You are here

public function Insert::__toString in Drupal driver for SQL Server and SQL Azure 8.2

Same name and namespace in other branches
  1. 8 drivers/lib/Drupal/Driver/Database/sqlsrv/Insert.php \Drupal\Driver\Database\sqlsrv\Insert::__toString()
  2. 3.0.x drivers/lib/Drupal/Driver/Database/sqlsrv/Insert.php \Drupal\Driver\Database\sqlsrv\Insert::__toString()

Implements PHP magic __toString method to convert the query to a string.

Return value

string The prepared statement.

Overrides Insert::__toString

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Insert.php, line 204
Definition of Drupal\Driver\Database\sqlsrv\Insert

Class

Insert

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function __toString() {

  // Default to a query that inserts everything at the same time.
  return $this
    ->BuildQuery(count($this->insertValues));
}