datadict-ibase.inc.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. @version v5.20.17 31-Mar-2020
  4. @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
  5. @copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
  6. Released under both BSD license and Lesser GPL library license.
  7. Whenever there is any discrepancy between the two licenses,
  8. the BSD license will take precedence.
  9. Set tabs to 4 for best viewing.
  10. */
  11. // security - hide paths
  12. if (!defined('ADODB_DIR')) die();
  13. class ADODB2_ibase extends ADODB_DataDict {
  14. var $databaseType = 'ibase';
  15. var $seqField = false;
  16. function ActualType($meta)
  17. {
  18. switch($meta) {
  19. case 'C': return 'VARCHAR';
  20. case 'XL':
  21. case 'X': return 'VARCHAR(4000)';
  22. case 'C2': return 'VARCHAR'; // up to 32K
  23. case 'X2': return 'VARCHAR(4000)';
  24. case 'B': return 'BLOB';
  25. case 'D': return 'DATE';
  26. case 'TS':
  27. case 'T': return 'TIMESTAMP';
  28. case 'L': return 'SMALLINT';
  29. case 'I': return 'INTEGER';
  30. case 'I1': return 'SMALLINT';
  31. case 'I2': return 'SMALLINT';
  32. case 'I4': return 'INTEGER';
  33. case 'I8': return 'INTEGER';
  34. case 'F': return 'DOUBLE PRECISION';
  35. case 'N': return 'DECIMAL';
  36. default:
  37. return $meta;
  38. }
  39. }
  40. function AlterColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
  41. {
  42. if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
  43. return array();
  44. }
  45. function DropColumnSQL($tabname, $flds, $tableflds='', $tableoptions='')
  46. {
  47. if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
  48. return array();
  49. }
  50. }