Returns true if the table exists, or false if not.
339163
public boolean tableExists(TableReference tableRef) throws IOException {
    try {
      Table fetchedTable = service.tables().get(
          tableRef.getProjectId(), tableRef.getDatasetId(), tableRef.getTableId()).execute();
      logger.atFine().log(
          "Successfully fetched table '%s' for tableRef '%s'", fetchedTable, tableRef);
      return true;
    } catch (IOException ioe) {
      if (errorExtractor.itemNotFound(ioe)) {
        return false;
      } else {
        // Unhandled exceptions should just propagate up.
        throw ioe;
      }
    }
  }
1346275
def does_table_exist(self, model_class):
        '''
        
        '''
        sql = "SELECT count() FROM system.tables WHERE database = '%s' AND name = '%s'"
        r = self._send(sql % (self.db_name, model_class.table_name()))
        return r.text.strip() == '1'
518454
private static boolean tableExists(CallInfo callInfo, DB db, String tableName) {
    return db.access(callInfo, () -> { 
      DatabaseMetaData dbmd = db.getConnection().getMetaData();
      try(ResultSet rs = dbmd.getTables(null, null, null, new String[] {"TABLE"})) {
        while(rs.next()) { 
          if (tableName.equalsIgnoreCase(rs.getString("TABLE_NAME"))) {
            return true;
          }
        }
      }
      return false;
    });
  }
661085
private function _tableExists() {

        // Try a select statement against the table
        // Run it in try/catch in case PDO is in ERRMODE_EXCEPTION.
        try {
            $result = mysqli_query($this->link,"SELECT 1 FROM $this->table_name LIMIT 1");
        } catch (\Exception $e) {
            // We got an exception == table not found
            return FALSE;
        }

        // Result is either boolean FALSE (no table found) or PDOStatement Object (table found)
        return $result !== FALSE;
    }
154208
public boolean tableExists(String table)
		throws SQLException
	{

		PreparedStatement statement = null;
		ResultSet result = null;
		try {
			statement = this.connection.prepareStatement("SHOW TABLES;");
			result = execute(statement);

			if (result == null) {
				return false;
			}
			boolean found = false;
			while(result.next()){
					if(table.equalsIgnoreCase(result.getString(1))){
						found = true;
					}
			}
			return found;

		}
		finally {
			if (statement != null) {
				statement.close();
			}
			if (result != null) {
				result.close();
			}
		}

	}
441955
def is_table(engine, sql):
    
    if engine.dialect.has_table(engine, sql):
        return True
    return False
12718
def exists(self):
    
    try:
      info = self._api.tables_get(self._name_parts)
    except google.datalab.utils.RequestException as e:
      if e.status == 404:
        return False
      raise e
    except Exception as e:
      raise e
    self._info = info
    return True
686839
public function hasTable($table) {
        //$sql = $this->grammar->compileTableExists();
        $table = $this->connection->getTablePrefix() . $table;
        return count($this->connection->select(array($table))) > 0;
    }
122512
public function sessdb_table_exists() {
		try {
			$this->db->run_query("SELECT * FROM ". self::tableName .
					" ORDER BY ". self::tablePKey ." LIMIT 1");
			$exists = true;
		}
		catch(exception $e) {
			$this->exception_handler(__METHOD__ .": exception while trying to detect table::: ". $e->getMessage());
			$exists = false;
		}
		
		return($exists);
	}
818860
public boolean has(String tableName, String columnName) {
		return has(EXTENSION_NAME, tableName, columnName)
				&& connection.tableExists(getRTreeTableName(tableName,
						columnName));
	}
143371
def check_table_exists(dbcon, tablename):
    
    dbcur = dbcon.cursor()
    dbcur.execute("SELECT name FROM sqlite_master WHERE type='table' AND name='%s';" % tablename)
    result = dbcur.fetchone()
    dbcur.close()
    if result is None:
        return False
    else:
        try:
            return result[0] == tablename
        except IndexError as e:
            return check_table_exists(dbcon, tablename)
251972
protected function tableExists($tableName) {
		if(isset($this->nonExistingTables[$tableName]))
			return false;
		if(isset($this->existingTables[$tableName]))
			return true;
		$exists = $this->schemaManager->tablesExist(array(
			$tableName 
		));
		if(!$exists) {
			$this->nonExistingTables[$tableName] = 1;
		} else {
			$this->existingTables[$tableName] = 1;
		}
		return $exists;
	}
1194502
def tableexists(tablename):
    """"""
    result = True
    try:
        t = table(tablename, ack=False)
    except:
        result = False
    return result
6118
public function tableExists($table)
    {
        $database = null;
        if (($pos = strpos($table, '.')) !== false) {
            $database = substr($table, 0, $pos);
            $table = substr($table, $pos + 1);
        } else {
            $table = $this->buildRealTableName($table, false);
        }
        
        $tables = $this->getTables($database);
        
        return in_array($table, $tables);
    }
718481
boolean exists(final String tableName, final Object rowKey) throws UncheckedIOException {
        return exists(tableName, AnyGet.of(rowKey));
    }
1335176
public function hasTable($table)
    {
        $conn = $this->connection->getConnection();
        $db = r\db($this->connection->getDatabaseName());
        $tables = $db->tableList()->run($conn);

        return in_array($table, $tables);
    }
879608
public function exists()
    {
        $quotedTable = \Database\DatabaseConnectionFactory::get()->quote($this->getTable());
        $record = \Database\DatabaseConnectionFactory::get()->query("show tables like {$quotedTable}");
        return !is_a($record, 'Database\DatabaseRecord\EmptyDatabaseRecord') && count($record->all()) > 0;
    }