PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/concrete/libraries/3rdparty/adodb/drivers/adodb-postgres9.inc.php

https://bitbucket.org/selfeky/xclusivescardwebsite
PHP | 57 lines | 31 code | 10 blank | 16 comment | 2 complexity | f87779a83f516f17937e544dc05cbdf5 MD5 | raw file
  1. <?php
  2. /*
  3. V5.14 8 Sept 2011 (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  4. Released under both BSD license and Lesser GPL library license.
  5. Whenever there is any discrepancy between the two licenses,
  6. the BSD license will take precedence.
  7. Set tabs to 4.
  8. Postgres9 support.
  9. 01 Dec 2011: gherteg added support for retrieving insert IDs from tables without OIDs
  10. */
  11. // security - hide paths
  12. if (!defined('ADODB_DIR')) die();
  13. include_once(ADODB_DIR."/drivers/adodb-postgres7.inc.php");
  14. class ADODB_postgres9 extends ADODB_postgres7 {
  15. var $databaseType = 'postgres9';
  16. function ADODB_postgres9()
  17. {
  18. $this->ADODB_postgres7();
  19. }
  20. // Don't use OIDs, as they typically won't be there, and
  21. // they're not what the application wants back, anyway.
  22. function _insertid($table,$column)
  23. {
  24. return empty($table) || empty($column)
  25. ? $this->GetOne("SELECT lastval()")
  26. : $this->GetOne("SELECT currval(pg_get_serial_sequence('$table','$column'))");
  27. }
  28. }
  29. /*--------------------------------------------------------------------------------------
  30. Class Name: Recordset
  31. --------------------------------------------------------------------------------------*/
  32. class ADORecordSet_postgres9 extends ADORecordSet_postgres7{
  33. var $databaseType = "postgres9";
  34. function ADORecordSet_postgres9($queryID,$mode=false)
  35. {
  36. $this->ADORecordSet_postgres7($queryID,$mode);
  37. }
  38. }
  39. class ADORecordSet_assoc_postgres9 extends ADORecordSet_postgres7{
  40. var $databaseType = "postgres9";
  41. function ADORecordSet_assoc_postgres9($queryID,$mode=false)
  42. {
  43. $this->ADORecordSet_postgres7($queryID,$mode);
  44. }
  45. }
  46. ?>