$this->assertEqual($this->adapter->pop(),"SELECT sequence_name FROM sys.user_sequences");
}
publicfunctiontestListTableColumnsExecutesSql()
{
$this->import->listTableColumns('table');
2007-06-10 23:23:46 +04:00
$q="SELECT column_name, data_type, data_length, nullable, data_default, data_scale, data_precision FROM all_tab_columns WHERE table_name = 'TABLE' ORDER BY column_name";
2007-01-25 01:50:49 +03:00
$this->assertEqual($this->adapter->pop(),$q);
}
publicfunctiontestListTableIndexesExecutesSql()
{
$this->import->listTableIndexes('table');
$q='SELECT index_name name FROM user_indexes'
." WHERE table_name = 'table' OR table_name = 'TABLE'"
." AND generated = 'N'";
$this->assertEqual($this->adapter->pop(),$q);
}
publicfunctiontestListTablesExecutesSql()
{
$this->import->listTables();
$q='SELECT table_name FROM sys.user_tables';
$this->assertEqual($this->adapter->pop(),$q);
}
publicfunctiontestListDatabasesExecutesSql()
{
$this->import->listDatabases();
$q='SELECT username FROM sys.dba_users';
$this->assertEqual($this->adapter->pop(),$q);
}
publicfunctiontestListUsersExecutesSql()
{
$this->import->listUsers();
$q='SELECT username FROM sys.dba_users';
$this->assertEqual($this->adapter->pop(),$q);
}
publicfunctiontestListViewsExecutesSql()
{
$this->import->listViews();
$q='SELECT view_name FROM sys.user_views';
$this->assertEqual($this->adapter->pop(),$q);
}
publicfunctiontestListFunctionsExecutesSql()
{
$this->import->listFunctions();
$q="SELECT name FROM sys.user_source WHERE line = 1 AND type = 'FUNCTION'";