blob: 74b0165cb84dca23f1690d4d0e62de9bf8cc8157 [file] [log] [blame]
admin7b613c72006-09-24 18:05:17 +00001<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
2/**
3 * Code Igniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
7 * @package CodeIgniter
8 * @author Rick Ellis
9 * @copyright Copyright (c) 2006, pMachine, Inc.
10 * @license http://www.codeignitor.com/user_guide/license.html
11 * @link http://www.codeigniter.com
12 * @since Version 1.0
13 * @filesource
14 */
15
16// ------------------------------------------------------------------------
17
18/**
19 * Oracle Utility Class
20 *
21 * @category Database
22 * @author Rick Ellis
23 * @link http://www.codeigniter.com/user_guide/database/
24 */
admina5e812c2006-09-25 02:17:30 +000025class CI_DB_oci8_utility extends CI_DB_utility {
26
27
admin6ca6f942006-09-25 02:51:08 +000028 /**
29 * Create database
30 *
31 * @access public
32 * @param string the database name
33 * @return bool
34 */
admin6cec6a52006-09-25 06:56:49 +000035 function _create_database($name)
admin6ca6f942006-09-25 02:51:08 +000036 {
admin6ca6f942006-09-25 02:51:08 +000037 }
38
39 // --------------------------------------------------------------------
40
41 /**
42 * Drop database
43 *
44 * @access public
45 * @param string the database name
46 * @return bool
47 */
48 function drop_database($name)
49 {
admin72496372006-09-25 03:44:04 +000050 }
admin6ca6f942006-09-25 02:51:08 +000051
admin72496372006-09-25 03:44:04 +000052 // --------------------------------------------------------------------
53
54 /**
55 * List databases
56 *
57 * @access public
58 * @return bool
59 */
60 function list_databases()
61 {
admin6ca6f942006-09-25 02:51:08 +000062 }
63
64 // --------------------------------------------------------------------
admina5e812c2006-09-25 02:17:30 +000065
admin4ceac2d2006-09-25 06:40:16 +000066 /**
67 * Drop Table
68 *
69 * @access public
70 * @return bool
71 */
72 function drop_table($table)
73 {
74 }
75
76 // --------------------------------------------------------------------
77
admina5e812c2006-09-25 02:17:30 +000078 /**
79 * Version number query string
80 *
81 * @access public
82 * @return string
83 */
84 function _version()
85 {
86 return ociserverversion($this->conn_id);
87 }
88
89 // --------------------------------------------------------------------
90
91 /**
92 * Show table query
93 *
94 * Generates a platform-specific query string so that the table names can be fetched
95 *
96 * @access public
97 * @return string
98 */
99 function _show_tables()
100 {
101 return "select TABLE_NAME FROM ALL_TABLES";
102 }
103
104 // --------------------------------------------------------------------
105
106 /**
107 * Show columnn query
108 *
109 * Generates a platform-specific query string so that the column names can be fetched
110 *
111 * @access public
112 * @param string the table name
113 * @return string
114 */
115 function _show_columns($table = '')
116 {
117 return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'";
118 }
119
120 // --------------------------------------------------------------------
121
122 /**
123 * Field data query
124 *
125 * Generates a platform-specific query so that the column data can be retrieved
126 *
127 * @access public
128 * @param string the table name
129 * @return object
130 */
131 function _field_data($table)
132 {
admin6cec6a52006-09-25 06:56:49 +0000133 return "SELECT * FROM ".$this->db->_escape_table($table)." where rownum = 1";
admina5e812c2006-09-25 02:17:30 +0000134 }
135
admin7b613c72006-09-24 18:05:17 +0000136
137}
138
139?>