|
@@ 6033-6043 (lines=11) @@
|
| 6030 |
|
/** |
| 6031 |
|
* @see QueryWriter::getColumns |
| 6032 |
|
*/ |
| 6033 |
|
public function getColumns( $table ) |
| 6034 |
|
{ |
| 6035 |
|
$table = $this->esc( $table, TRUE ); |
| 6036 |
|
|
| 6037 |
|
$columnsRaw = $this->adapter->get( "PRAGMA table_info('$table')" ); |
| 6038 |
|
|
| 6039 |
|
$columns = array(); |
| 6040 |
|
foreach ( $columnsRaw as $r ) $columns[$r['name']] = $r['type']; |
| 6041 |
|
|
| 6042 |
|
return $columns; |
| 6043 |
|
} |
| 6044 |
|
|
| 6045 |
|
/** |
| 6046 |
|
* @see QueryWriter::addUniqueIndex |
|
@@ 6319-6331 (lines=13) @@
|
| 6316 |
|
/** |
| 6317 |
|
* @see QueryWriter::getColumns |
| 6318 |
|
*/ |
| 6319 |
|
public function getColumns( $table ) |
| 6320 |
|
{ |
| 6321 |
|
$table = $this->esc( $table, TRUE ); |
| 6322 |
|
|
| 6323 |
|
$columnsRaw = $this->adapter->get( "SELECT column_name, data_type FROM information_schema.columns WHERE table_name='$table'" ); |
| 6324 |
|
|
| 6325 |
|
$columns = array(); |
| 6326 |
|
foreach ( $columnsRaw as $r ) { |
| 6327 |
|
$columns[$r['column_name']] = $r['data_type']; |
| 6328 |
|
} |
| 6329 |
|
|
| 6330 |
|
return $columns; |
| 6331 |
|
} |
| 6332 |
|
|
| 6333 |
|
/** |
| 6334 |
|
* @see QueryWriter::scanType |