test_class.declarator: TEST_CATALOG = "catalog"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_CATALOG = "catalog";
test_class.type: String
test_class.var_name: TEST_CATALOG
test_class.declarator: TEST_TABLE = "table"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_TABLE = "table";
test_class.type: String
test_class.var_name: TEST_TABLE
test_class.declarator: dataSource
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DataSource dataSource;
test_class.type: DataSource
test_class.var_name: dataSource
test_class.declarator: connection
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Connection connection;
test_class.type: Connection
test_class.var_name: connection
test_class.declarator: databaseMetaData
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DatabaseMetaData databaseMetaData;
test_class.type: DatabaseMetaData
test_class.var_name: databaseMetaData
test_class.declarator: primaryResultSet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSet primaryResultSet;
test_class.type: ResultSet
test_class.var_name: primaryResultSet
test_class.declarator: tableExistResultSet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSet tableExistResultSet;
test_class.type: ResultSet
test_class.var_name: tableExistResultSet
test_class.declarator: tableNotExistResultSet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSet tableNotExistResultSet;
test_class.type: ResultSet
test_class.var_name: tableNotExistResultSet
test_class.declarator: columnResultSet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSet columnResultSet;
test_class.type: ResultSet
test_class.var_name: columnResultSet
test_class.declarator: statement
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Statement statement;
test_class.type: Statement
test_class.var_name: statement
test_class.declarator: caseSensitivesResultSet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSet caseSensitivesResultSet;
test_class.type: ResultSet
test_class.var_name: caseSensitivesResultSet
test_class.declarator: resultSetMetaData
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSetMetaData resultSetMetaData;
test_class.type: ResultSetMetaData
test_class.var_name: resultSetMetaData
test_class.declarator: indexResultSet
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultSet indexResultSet;
test_class.type: ResultSet
test_class.var_name: indexResultSet
test_class.file: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/test/java/org/apache/shardingsphere/sql/parser/binder/metadata/table/TableMetaDataLoaderTest.java
test_class.identifier: TableMetaDataLoaderTest
test_case.body: @Test
      public void assertTableNotExist() throws SQLException {
          when(databaseMetaData.getTables(TEST_CATALOG, null, TEST_TABLE, null)).thenReturn(tableNotExistResultSet);
          when(tableNotExistResultSet.next()).thenReturn(false);
          Optional<TableMetaData> actual = TableMetaDataLoader.load(dataSource, TEST_TABLE, "");
          assertFalse(actual.isPresent());
      }
test_case.class_method_signature: TableMetaDataLoaderTest.assertTableNotExist()
test_case.full_signature: @Test public void assertTableNotExist()
test_case.identifier: assertTableNotExist
test_case.invocations: thenReturn when getTables thenReturn when next load assertFalse isPresent
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertTableNotExist()
focal_class.file: shardingsphere-sql-parser/shardingsphere-sql-parser-binder/src/main/java/org/apache/shardingsphere/sql/parser/binder/metadata/table/TableMetaDataLoader.java
focal_class.identifier: TableMetaDataLoader
focal_class.class_method_signature: TableMetaDataLoader.load(final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_class.full_signature: public static Optional<TableMetaData> load(final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_class.identifier: load
focal_class.modifiers: public static
focal_class.parameters: (final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_class.return: Optional<TableMetaData>
focal_class.signature: Optional<TableMetaData> load(final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_class.class_method_signature: TableMetaDataLoader.isTableExist(final Connection connection, final String tableNamePattern, final String databaseType)
focal_class.full_signature: private static boolean isTableExist(final Connection connection, final String tableNamePattern, final String databaseType)
focal_class.identifier: isTableExist
focal_class.modifiers: private static
focal_class.parameters: (final Connection connection, final String tableNamePattern, final String databaseType)
focal_class.return: boolean
focal_class.signature: boolean isTableExist(final Connection connection, final String tableNamePattern, final String databaseType)
focal_method.body: public static Optional<TableMetaData> load(final DataSource dataSource, final String tableNamePattern, final String databaseType) throws SQLException {
          try (MetaDataConnection connection = new MetaDataConnection(dataSource.getConnection())) {
              if (!isTableExist(connection, tableNamePattern, databaseType)) {
                  return Optional.empty();
              }
              return Optional.of(new TableMetaData(ColumnMetaDataLoader.load(connection, tableNamePattern, databaseType), IndexMetaDataLoader.load(connection, tableNamePattern, databaseType)));
          }
      }
focal_method.class_method_signature: TableMetaDataLoader.load(final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_method.full_signature: public static Optional<TableMetaData> load(final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_method.identifier: load
focal_method.invocations: getConnection isTableExist empty of load load
focal_method.modifiers: public static
focal_method.parameters: (final DataSource dataSource, final String tableNamePattern, final String databaseType)
focal_method.return: Optional<TableMetaData>
focal_method.signature: Optional<TableMetaData> load(final DataSource dataSource, final String tableNamePattern, final String databaseType)