Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update docblocks

  • Loading branch information...
commit 7d47554cf0b9cc344498835d4eeba23b20c06347 1 parent ef17ebb
@pmjones pmjones authored
View
47 src/AbstractSchema.php
@@ -21,8 +21,22 @@
*/
abstract class AbstractSchema implements SchemaInterface
{
+ /**
+ *
+ * The quote prefix for identifier names.
+ *
+ * @var string
+ *
+ */
protected $quote_name_prefix = '`';
+ /**
+ *
+ * The quote suffix for identifier names.
+ *
+ * @var string
+ *
+ */
protected $quote_name_suffix = '`';
/**
@@ -197,6 +211,17 @@ public function quoteName($name)
return $this->quote_name_prefix . $name . $this->quote_name_suffix;
}
+ /**
+ *
+ * Fetch all result rows.
+ *
+ * @param string $statement The SQL statement.
+ *
+ * @param array $values Values to bind to the SQL statement.
+ *
+ * @return array
+ *
+ */
protected function pdoFetchAll($statement, array $values = array())
{
$sth = $this->pdo->prepare($statement);
@@ -204,6 +229,17 @@ protected function pdoFetchAll($statement, array $values = array())
return $sth->fetchAll(PDO::FETCH_ASSOC);
}
+ /**
+ *
+ * Fetch the first column of all result rows.
+ *
+ * @param string $statement The SQL statement.
+ *
+ * @param array $values Values to bind to the SQL statement.
+ *
+ * @return array
+ *
+ */
protected function pdoFetchCol($statement, array $values = array())
{
$sth = $this->pdo->prepare($statement);
@@ -211,6 +247,17 @@ protected function pdoFetchCol($statement, array $values = array())
return $sth->fetchAll(PDO::FETCH_COLUMN, 0);
}
+ /**
+ *
+ * Fetch the first column of the first row.
+ *
+ * @param string $statement The SQL statement.
+ *
+ * @param array $values Values to bind to the SQL statement.
+ *
+ * @return mixed
+ *
+ */
protected function pdoFetchValue($statement, array $values = array())
{
$sth = $this->pdo->prepare($statement);
View
14 src/MysqlSchema.php
@@ -19,8 +19,22 @@
*/
class MysqlSchema extends AbstractSchema
{
+ /**
+ *
+ * The quote prefix for identifier names.
+ *
+ * @var string
+ *
+ */
protected $quote_name_prefix = '`';
+ /**
+ *
+ * The quote suffix for identifier names.
+ *
+ * @var string
+ *
+ */
protected $quote_name_suffix = '`';
/**
View
18 src/SqlsrvSchema.php
@@ -21,6 +21,24 @@ class SqlsrvSchema extends AbstractSchema
{
/**
*
+ * The quote prefix for identifier names.
+ *
+ * @var string
+ *
+ */
+ protected $quote_name_prefix = '[';
+
+ /**
+ *
+ * The quote suffix for identifier names.
+ *
+ * @var string
+ *
+ */
+ protected $quote_name_suffix = ']';
+
+ /**
+ *
* Returns a list of all tables in the database.
*
* @param string $schema Fetch tbe list of tables in this schema;
Please sign in to comment.
Something went wrong with that request. Please try again.