Spade
Mini Shell
mysql.php000064400000002361151172263120006424 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* MySQL database iterator.
*
* @link http://dev.mysql.com/doc/
* @since 3.0.0
* @deprecated 4.0 Use MySQLi or PDO MySQL instead
*/
class JDatabaseIteratorMysql extends JDatabaseIterator
{
/**
* Get the number of rows in the result set for the executed SQL given by
the cursor.
*
* @return integer The number of rows in the result set.
*
* @since 3.0.0
* @see Countable::count()
*/
public function count()
{
return mysql_num_rows($this->cursor);
}
/**
* Method to fetch a row from the result set cursor as an object.
*
* @return mixed Either the next row from the result set or false if
there are no more rows.
*
* @since 3.0.0
*/
protected function fetchObject()
{
return mysql_fetch_object($this->cursor, $this->class);
}
/**
* Method to free up the memory used for the result set.
*
* @return void
*
* @since 3.0.0
*/
protected function freeResult()
{
mysql_free_result($this->cursor);
}
}
mysqli.php000064400000002222151172263130006572 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* MySQLi database iterator.
*
* @since 3.0.0
*/
class JDatabaseIteratorMysqli extends JDatabaseIterator
{
/**
* Get the number of rows in the result set for the executed SQL given by
the cursor.
*
* @return integer The number of rows in the result set.
*
* @since 3.0.0
* @see Countable::count()
*/
public function count()
{
return mysqli_num_rows($this->cursor);
}
/**
* Method to fetch a row from the result set cursor as an object.
*
* @return mixed Either the next row from the result set or false if
there are no more rows.
*
* @since 3.0.0
*/
protected function fetchObject()
{
return mysqli_fetch_object($this->cursor, $this->class);
}
/**
* Method to free up the memory used for the result set.
*
* @return void
*
* @since 3.0.0
*/
protected function freeResult()
{
mysqli_free_result($this->cursor);
}
}
oracle.php000064400000000612151172263130006522 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* Oracle database iterator.
*
* @since 3.0.0
*/
class JDatabaseIteratorOracle extends JDatabaseIteratorPdo
{
}
pdo.php000064400000002643151172263130006045 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* PDO database iterator.
*
* @since 3.0.0
*/
class JDatabaseIteratorPdo extends JDatabaseIterator
{
/**
* Get the number of rows in the result set for the executed SQL given by
the cursor.
*
* @return integer The number of rows in the result set.
*
* @since 3.0.0
* @see Countable::count()
*/
public function count()
{
if (!empty($this->cursor) && $this->cursor instanceof
PDOStatement)
{
return $this->cursor->rowCount();
}
else
{
return 0;
}
}
/**
* Method to fetch a row from the result set cursor as an object.
*
* @return mixed Either the next row from the result set or false if
there are no more rows.
*
* @since 3.0.0
*/
protected function fetchObject()
{
if (!empty($this->cursor) && $this->cursor instanceof
PDOStatement)
{
return $this->cursor->fetchObject($this->class);
}
else
{
return false;
}
}
/**
* Method to free up the memory used for the result set.
*
* @return void
*
* @since 3.0.0
*/
protected function freeResult()
{
if (!empty($this->cursor) && $this->cursor instanceof
PDOStatement)
{
$this->cursor->closeCursor();
}
}
}
pdomysql.php000064400000001032151172263130007122 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* MySQL database iterator for the PDO based MySQL database driver.
*
* @package Joomla.Platform
* @subpackage Database
* @link https://dev.mysql.com/doc/
* @since 3.4
*/
class JDatabaseIteratorPdomysql extends JDatabaseIteratorPdo
{
}
pgsql.php000064400000000672151172263130006411 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* PostgreSQL database iterator for the PDO based PostgreSQL database
driver.
*
* @since 3.9.0
*/
class JDatabaseIteratorPgsql extends JDatabaseIteratorPdo
{
}
postgresql.php000064400000002311151172263130007456 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* PostgreSQL database iterator.
*
* @since 3.2.0
* @deprecated 4.0 Use PDO PostgreSQL instead
*/
class JDatabaseIteratorPostgresql extends JDatabaseIterator
{
/**
* Get the number of rows in the result set for the executed SQL given by
the cursor.
*
* @return integer The number of rows in the result set.
*
* @since 3.2.0
* @see Countable::count()
*/
public function count()
{
return pg_num_rows($this->cursor);
}
/**
* Method to fetch a row from the result set cursor as an object.
*
* @return mixed Either the next row from the result set or false if
there are no more rows.
*
* @since 3.2.0
*/
protected function fetchObject()
{
return pg_fetch_object($this->cursor, null, $this->class);
}
/**
* Method to free up the memory used for the result set.
*
* @return void
*
* @since 3.2.0
*/
protected function freeResult()
{
pg_free_result($this->cursor);
}
}
sqlazure.php000064400000000622151172263130007124 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* SQL azure database iterator.
*
* @since 3.0.0
*/
class JDatabaseIteratorSqlazure extends JDatabaseIteratorSqlsrv
{
}
sqlite.php000064400000000612151172263130006556 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* SQLite database iterator.
*
* @since 3.0.0
*/
class JDatabaseIteratorSqlite extends JDatabaseIteratorPdo
{
}
sqlsrv.php000064400000002224151172263130006610 0ustar00<?php
/**
* @package Joomla.Platform
* @subpackage Database
*
* @copyright Copyright (C) 2005 - 2020 Open Source Matters, Inc. All
rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* SQL server database iterator.
*
* @since 3.0.0
*/
class JDatabaseIteratorSqlsrv extends JDatabaseIterator
{
/**
* Get the number of rows in the result set for the executed SQL given by
the cursor.
*
* @return integer The number of rows in the result set.
*
* @since 3.0.0
* @see Countable::count()
*/
public function count()
{
return sqlsrv_num_rows($this->cursor);
}
/**
* Method to fetch a row from the result set cursor as an object.
*
* @return mixed Either the next row from the result set or false if
there are no more rows.
*
* @since 3.0.0
*/
protected function fetchObject()
{
return sqlsrv_fetch_object($this->cursor, $this->class);
}
/**
* Method to free up the memory used for the result set.
*
* @return void
*
* @since 3.0.0
*/
protected function freeResult()
{
sqlsrv_free_stmt($this->cursor);
}
}