示例#1
0
def column_exists(table, column):
  """
   Check if a column exists in the given table.
  """
  return bool(lib_database.fetch_object(\
    lib_database.query("SHOW COLUMNS FROM {" + \
    lib_database.escape_table(table)  + "} LIKE '" + \
    lib_database.escape_table(column) + "'")))
示例#2
0
def column_exists(table, column):
    """
   Check if a column exists in the given table.
  """
    return bool(lib_database.fetch_object(\
      lib_database.query("SHOW COLUMNS FROM {" + \
      lib_database.escape_table(table)  + "} LIKE '" + \
      lib_database.escape_table(column) + "'")))
示例#3
0
def table_exists(table):
  """
   Check if a table exists.
  """
  return bool(lib_database.fetch_object(\
    lib_database.query("SHOW TABLES LIKE '{" +  \
    lib_database.escape_table(table)  + "}'")))
示例#4
0
def table_exists(table):
    """
   Check if a table exists.
  """
    return bool(lib_database.fetch_object(\
      lib_database.query("SHOW TABLES LIKE '{" +  \
      lib_database.escape_table(table)  + "}'")))