本文整理汇总了PHP中DatabaseManager::getCurrentTables方法的典型用法代码示例。如果您正苦于以下问题:PHP DatabaseManager::getCurrentTables方法的具体用法?PHP DatabaseManager::getCurrentTables怎么用?PHP DatabaseManager::getCurrentTables使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DatabaseManager
的用法示例。
在下文中一共展示了DatabaseManager::getCurrentTables方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createDBSNPTable
static function createDBSNPTable($con, $tableName)
{
try {
$tableLists = DatabaseManager::getCurrentTables($con, self::$dbName);
$v = in_array($tableName, $tableLists);
if (!$v) {
$rs = false;
} else {
$rs = true;
}
if (!$rs) {
$columnName = array("chrom", "pos");
$columnParams = array("varchar(30)", "int");
$index = "index(chrom,pos)";
$a = TableCreator::createReferenceTable($con, $tableName, $columnName, $columnParams, $index);
if (!$a) {
throw new Exception("Error create dbSNP table");
}
}
} catch (Exception $e) {
REDLog::writeErrLog($e->getMessage());
}
}
示例2: createRefSeqGeneTable
static function createRefSeqGeneTable($con, $tableName)
{
try {
$tableLists = DatabaseManager::getCurrentTables($con, self::$dbName);
$v = in_array($tableName, $tableLists);
if (!$v) {
$rs = false;
} else {
$rs = true;
}
if (!$rs) {
$columnName = array("bin", "name", "chrom", "strand", "txStart", "txEnd", "cdsStart", "cdsEnd", "exonCount", "exonStarts", "exonEnds", "score", "name2", "cdsStartStat", "cdsEndStat", "exonFrames");
$columnParams = array("int", "varchar(255)", "varchar(255)", "varchar(1)", "int", "int", "int", "int", "int", "longblob", "longblob", "int", "varchar(255)", "varchar(8)", "varchar(8)", "longblob");
$index = "index(chrom,txStart,txEnd)";
$a = TableCreator::createReferenceTable($con, $tableName, $columnName, $columnParams, $index);
if (!$a) {
throw new Exception("Error create RefSeqGene table");
}
}
} catch (Exception $e) {
REDLog::writeErrLog($e->getMessage());
}
}
示例3: createSpliceJunctionTable
static function createSpliceJunctionTable($con, $tableName)
{
try {
$tableLists = DatabaseManager::getCurrentTables($con, self::$dbName);
$v = in_array($tableName, $tableLists);
if (!$v) {
$rs = false;
} else {
$rs = true;
}
if (!$rs) {
//existTable($tableName)
$columnName = array("chrom", "ref", "type", "begin", "end", "score", "strand", "frame", "info");
$columnParams = array("varchar(30)", "varchar(30)", "varchar(10)", "int", "int", "float(8,6)", "varchar(1)", "varchar(1)", "varchar(100)");
$index = "index(chrom,type)";
$v = TableCreator::createReferenceTable($con, $tableName, $columnName, $columnParams, $index);
if (!$v) {
throw new Exception("Error create Splice Junction table");
}
}
} catch (Exception $e) {
REDLog::writeErrLog($e->getMessage());
}
}
示例4: createRepeatRegionsTable
static function createRepeatRegionsTable($con, $tableName)
{
try {
$tableLists = DatabaseManager::getCurrentTables($con, self::$dbName);
$v = in_array($tableName, $tableLists);
if (!$v) {
$rs = false;
} else {
$rs = true;
}
if (!$rs) {
//existTable($tableName)
$columnName = array("chrom", "begin", "end", "type");
$columnParams = array("varchar(30)", "int", "int", "varchar(40)");
$index = "index(chrom,begin,end)";
$v = TableCreator::createReferenceTable($con, $tableName, $columnName, $columnParams, $index);
if (!$v) {
throw new Exception("Error create repeat regions table");
}
}
} catch (Exception $e) {
REDLog::writeErrLog($e->getMessage());
}
}