diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-18 18:31:33 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-18 18:31:33 +0100 |
commit | c6f4f85e27a10459422ab9789c894d13f0cd34c7 (patch) | |
tree | 6b4cf7a304242c5891952b428b3bca950924f309 /lib/private/db | |
parent | 9fac95c2ab46a734607657bbad6f164aaa61286f (diff) | |
parent | 8991e4505adba2dae8afe7b7941ec744bfe78712 (diff) | |
download | nextcloud-server-c6f4f85e27a10459422ab9789c894d13f0cd34c7.tar.gz nextcloud-server-c6f4f85e27a10459422ab9789c894d13f0cd34c7.zip |
Merge branch 'master' into scrutinizer_documentation_patches
Conflicts:
lib/private/migration/content.php
Diffstat (limited to 'lib/private/db')
-rw-r--r-- | lib/private/db/mdb2schemareader.php | 3 | ||||
-rw-r--r-- | lib/private/db/statementwrapper.php | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/private/db/mdb2schemareader.php b/lib/private/db/mdb2schemareader.php index b1fd2454cb0..f9a76786c3e 100644 --- a/lib/private/db/mdb2schemareader.php +++ b/lib/private/db/mdb2schemareader.php @@ -288,12 +288,13 @@ class MDB2SchemaReader { if (!empty($fields)) { if (isset($primary) && $primary) { $table->setPrimaryKey($fields, $name); - } else + } else { if (isset($unique) && $unique) { $table->addUniqueIndex($fields, $name); } else { $table->addIndex($fields, $name); } + } } else { throw new \DomainException('Empty index definition: ' . $name . ' options:' . print_r($fields, true)); } diff --git a/lib/private/db/statementwrapper.php b/lib/private/db/statementwrapper.php index 90dbef1c730..eaf215c7231 100644 --- a/lib/private/db/statementwrapper.php +++ b/lib/private/db/statementwrapper.php @@ -175,4 +175,18 @@ class OC_DB_StatementWrapper { public function fetchOne($colnum = 0) { return $this->statement->fetchColumn($colnum); } + + /** + * Binds a PHP variable to a corresponding named or question mark placeholder in the + * SQL statement that was use to prepare the statement. + * + * @param mixed $column Either the placeholder name or the 1-indexed placeholder index + * @param mixed $variable The variable to bind + * @param integer|null $type one of the PDO::PARAM_* constants + * @param integer|null $length max length when using an OUT bind + * @return boolean + */ + public function bindParam($column, &$variable, $type = null, $length = null){ + return $this->statement->bindParam($column, $variable, $type, $length); + } } |