test_class.declarator: client = null
test_class.modifier: private static
test_class.original_string: private static MetadataClient client = null;
test_class.type: MetadataClient
test_class.var_name: client
test_class.file: meta/src/test/java/com/qihoo/qsql/metadata/MetadataClientTest.java
test_class.identifier: MetadataClientTest
test_case.body: @Test
      public void testAccessEmbeddedDatabaseByMultipleClient() {
          try (MetadataClient otherClient = new MetadataClient()) {
              DatabaseValue first = otherClient.getBasicDatabaseInfo("student-profile");
              DatabaseValue second = client.getBasicDatabaseInfo("student-profile");
              Assert.assertNotNull(first);
              Assert.assertNotNull(second);
              Assert.assertEquals(first, second);
          } catch (SQLException ex) {
              Assert.assertTrue(false);
          }
      }
test_case.class_method_signature: MetadataClientTest.testAccessEmbeddedDatabaseByMultipleClient()
test_case.full_signature: @Test public void testAccessEmbeddedDatabaseByMultipleClient()
test_case.identifier: testAccessEmbeddedDatabaseByMultipleClient
test_case.invocations: getBasicDatabaseInfo getBasicDatabaseInfo assertNotNull assertNotNull assertEquals assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAccessEmbeddedDatabaseByMultipleClient()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(MetadataClient.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(MetadataClient.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: properties
focal_class.modifier: private static
focal_class.original_string: private static Properties properties;
focal_class.type: Properties
focal_class.var_name: properties
focal_class.declarator: connection
focal_class.modifier: private
focal_class.original_string: private Connection connection;
focal_class.type: Connection
focal_class.var_name: connection
focal_class.file: meta/src/main/java/com/qihoo/qsql/metadata/MetadataClient.java
focal_class.identifier: MetadataClient
focal_class.interfaces: implements AutoCloseable
focal_class.class_method_signature: MetadataClient.MetadataClient()
focal_class.full_signature: public  MetadataClient()
focal_class.identifier: MetadataClient
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  MetadataClient()
focal_class.class_method_signature: MetadataClient.getBasicDatabaseInfoById(Long dbId)
focal_class.full_signature: public DatabaseValue getBasicDatabaseInfoById(Long dbId)
focal_class.identifier: getBasicDatabaseInfoById
focal_class.modifiers: public
focal_class.parameters: (Long dbId)
focal_class.return: DatabaseValue
focal_class.signature: DatabaseValue getBasicDatabaseInfoById(Long dbId)
focal_class.class_method_signature: MetadataClient.getDataBaseList()
focal_class.full_signature: public List<DatabaseValue> getDataBaseList()
focal_class.identifier: getDataBaseList
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<DatabaseValue>
focal_class.signature: List<DatabaseValue> getDataBaseList()
focal_class.class_method_signature: MetadataClient.getBasicDatabaseInfo(String databaseName)
focal_class.full_signature: public DatabaseValue getBasicDatabaseInfo(String databaseName)
focal_class.identifier: getBasicDatabaseInfo
focal_class.modifiers: public
focal_class.parameters: (String databaseName)
focal_class.return: DatabaseValue
focal_class.signature: DatabaseValue getBasicDatabaseInfo(String databaseName)
focal_class.class_method_signature: MetadataClient.insertBasicDatabaseInfo(DatabaseValue value)
focal_class.full_signature: public Long insertBasicDatabaseInfo(DatabaseValue value)
focal_class.identifier: insertBasicDatabaseInfo
focal_class.modifiers: public
focal_class.parameters: (DatabaseValue value)
focal_class.return: Long
focal_class.signature: Long insertBasicDatabaseInfo(DatabaseValue value)
focal_class.class_method_signature: MetadataClient.insertDatabaseSchema(List<DatabaseParamValue> values)
focal_class.full_signature: public void insertDatabaseSchema(List<DatabaseParamValue> values)
focal_class.identifier: insertDatabaseSchema
focal_class.modifiers: public
focal_class.parameters: (List<DatabaseParamValue> values)
focal_class.return: void
focal_class.signature: void insertDatabaseSchema(List<DatabaseParamValue> values)
focal_class.class_method_signature: MetadataClient.getDatabaseSchema(Long databaseId)
focal_class.full_signature: public List<DatabaseParamValue> getDatabaseSchema(Long databaseId)
focal_class.identifier: getDatabaseSchema
focal_class.modifiers: public
focal_class.parameters: (Long databaseId)
focal_class.return: List<DatabaseParamValue>
focal_class.signature: List<DatabaseParamValue> getDatabaseSchema(Long databaseId)
focal_class.class_method_signature: MetadataClient.insertTableSchema(TableValue value)
focal_class.full_signature: public Long insertTableSchema(TableValue value)
focal_class.identifier: insertTableSchema
focal_class.modifiers: public
focal_class.parameters: (TableValue value)
focal_class.return: Long
focal_class.signature: Long insertTableSchema(TableValue value)
focal_class.class_method_signature: MetadataClient.getTableSchema(String tableName)
focal_class.full_signature: public List<TableValue> getTableSchema(String tableName)
focal_class.identifier: getTableSchema
focal_class.modifiers: public
focal_class.parameters: (String tableName)
focal_class.return: List<TableValue>
focal_class.signature: List<TableValue> getTableSchema(String tableName)
focal_class.class_method_signature: MetadataClient.getTableSchemaByTbl(String tableName)
focal_class.full_signature: public List<TableValue> getTableSchemaByTbl(String tableName)
focal_class.identifier: getTableSchemaByTbl
focal_class.modifiers: public
focal_class.parameters: (String tableName)
focal_class.return: List<TableValue>
focal_class.signature: List<TableValue> getTableSchemaByTbl(String tableName)
focal_class.class_method_signature: MetadataClient.insertFieldsSchema(List<ColumnValue> columns)
focal_class.full_signature: public void insertFieldsSchema(List<ColumnValue> columns)
focal_class.identifier: insertFieldsSchema
focal_class.modifiers: public
focal_class.parameters: (List<ColumnValue> columns)
focal_class.return: void
focal_class.signature: void insertFieldsSchema(List<ColumnValue> columns)
focal_class.class_method_signature: MetadataClient.deleteFieldsSchema(Long tbId)
focal_class.full_signature: public void deleteFieldsSchema(Long tbId)
focal_class.identifier: deleteFieldsSchema
focal_class.modifiers: public
focal_class.parameters: (Long tbId)
focal_class.return: void
focal_class.signature: void deleteFieldsSchema(Long tbId)
focal_class.class_method_signature: MetadataClient.getFieldsSchema(Long tableId)
focal_class.full_signature: public List<ColumnValue> getFieldsSchema(Long tableId)
focal_class.identifier: getFieldsSchema
focal_class.modifiers: public
focal_class.parameters: (Long tableId)
focal_class.return: List<ColumnValue>
focal_class.signature: List<ColumnValue> getFieldsSchema(Long tableId)
focal_class.class_method_signature: MetadataClient.getLastInsertPrimaryKey()
focal_class.full_signature: private Long getLastInsertPrimaryKey()
focal_class.identifier: getLastInsertPrimaryKey
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Long
focal_class.signature: Long getLastInsertPrimaryKey()
focal_class.class_method_signature: MetadataClient.createConnection()
focal_class.full_signature: private Connection createConnection()
focal_class.identifier: createConnection
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Connection
focal_class.signature: Connection createConnection()
focal_class.class_method_signature: MetadataClient.setAutoCommit(boolean flag)
focal_class.full_signature: public void setAutoCommit(boolean flag)
focal_class.identifier: setAutoCommit
focal_class.modifiers: public
focal_class.parameters: (boolean flag)
focal_class.return: void
focal_class.signature: void setAutoCommit(boolean flag)
focal_class.class_method_signature: MetadataClient.commit()
focal_class.full_signature: public void commit()
focal_class.identifier: commit
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void commit()
focal_class.class_method_signature: MetadataClient.rollback()
focal_class.full_signature: public void rollback()
focal_class.identifier: rollback
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rollback()
focal_class.class_method_signature: MetadataClient.close()
focal_class.full_signature: public void close()
focal_class.identifier: close
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: MetadataClient.getLastInsertSql()
focal_class.full_signature: public String getLastInsertSql()
focal_class.identifier: getLastInsertSql
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getLastInsertSql()
focal_method.body: public DatabaseValue getBasicDatabaseInfo(String databaseName) {
          DatabaseValue databaseValue = null;
          String sql = String.format("select DB_ID, `DESC`, NAME, DB_TYPE from DBS where name ='%s'", databaseName);
          LOGGER.debug("getBasicDatabaseInfo sql is {}", sql);
          try (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
              try (ResultSet resultSet = preparedStatement.executeQuery()) {
                  if (resultSet != null && resultSet.next()) {
                      databaseValue = new DatabaseValue();
                      databaseValue.setDbId(resultSet.getLong("DB_ID"));
                      databaseValue.setName(resultSet.getString("NAME"));
                      databaseValue.setDbType(resultSet.getString("DB_TYPE"));
                      databaseValue.setDesc(resultSet.getString("DESC"));
                  }
              }
              return databaseValue;
          } catch (SQLException ex) {
              throw new RuntimeException(ex);
          }
      }
focal_method.class_method_signature: MetadataClient.getBasicDatabaseInfo(String databaseName)
focal_method.full_signature: public DatabaseValue getBasicDatabaseInfo(String databaseName)
focal_method.identifier: getBasicDatabaseInfo
focal_method.invocations: format debug prepareStatement executeQuery next setDbId getLong setName getString setDbType getString setDesc getString
focal_method.modifiers: public
focal_method.parameters: (String databaseName)
focal_method.return: DatabaseValue
focal_method.signature: DatabaseValue getBasicDatabaseInfo(String databaseName)