diff options
Diffstat (limited to 'includes/database/schema.inc')
-rw-r--r-- | includes/database/schema.inc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/includes/database/schema.inc b/includes/database/schema.inc index de1b2f5b9..e2a1c4caa 100644 --- a/includes/database/schema.inc +++ b/includes/database/schema.inc @@ -176,10 +176,33 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface { */ protected $defaultSchema = 'public'; + /** + * A unique identifier for this query object. + */ + protected $uniqueIdentifier; + public function __construct($connection) { + $this->uniqueIdentifier = uniqid('', TRUE); $this->connection = $connection; } + /** + * Implements the magic __clone function. + */ + public function __clone() { + $this->uniqueIdentifier = uniqid('', TRUE); + } + + /** + * Implements QueryPlaceHolderInterface::uniqueIdentifier(). + */ + public function uniqueIdentifier() { + return $this->uniqueIdentifier; + } + + /** + * Implements QueryPlaceHolderInterface::nextPlaceholder(). + */ public function nextPlaceholder() { return $this->placeholder++; } |