test_class.declarator: sqlStatement
test_class.modifier: private
test_class.original_string: private CreateDataSourcesStatementContext sqlStatement;
test_class.type: CreateDataSourcesStatementContext
test_class.var_name: sqlStatement
test_class.file: shardingsphere-proxy/shardingsphere-proxy-common/src/test/java/org/apache/shardingsphere/proxy/convert/CreateDataSourcesStatementContextConverterTest.java
test_class.identifier: CreateDataSourcesStatementContextConverterTest
test_case.body: @Test
      public void assertGenerate() {
          Map<String, YamlDataSourceParameter> result = new CreateDataSourcesStatementContextConverter().convert(sqlStatement);
          assertThat(result.size(), is(2));
          assertTrue(result.keySet().containsAll(Arrays.asList("ds0", "ds1")));
          assertThat(result.values().iterator().next().getUsername(), is("root0"));
      }
test_case.class_method_signature: CreateDataSourcesStatementContextConverterTest.assertGenerate()
test_case.full_signature: @Test public void assertGenerate()
test_case.identifier: assertGenerate
test_case.invocations: convert assertThat size is assertTrue containsAll keySet asList assertThat getUsername next iterator values is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertGenerate()
focal_class.file: shardingsphere-proxy/shardingsphere-proxy-common/src/main/java/org/apache/shardingsphere/proxy/convert/CreateDataSourcesStatementContextConverter.java
focal_class.identifier: CreateDataSourcesStatementContextConverter
focal_class.interfaces: implements SQLStatementContextConverter<CreateDataSourcesStatementContext, Map<String, YamlDataSourceParameter>>
focal_class.class_method_signature: CreateDataSourcesStatementContextConverter.convert(final CreateDataSourcesStatementContext context)
focal_class.full_signature: @Override public Map<String, YamlDataSourceParameter> convert(final CreateDataSourcesStatementContext context)
focal_class.identifier: convert
focal_class.modifiers: @Override public
focal_class.parameters: (final CreateDataSourcesStatementContext context)
focal_class.return: Map<String, YamlDataSourceParameter>
focal_class.signature: Map<String, YamlDataSourceParameter> convert(final CreateDataSourcesStatementContext context)
focal_method.body: @Override
      public Map<String, YamlDataSourceParameter> convert(final CreateDataSourcesStatementContext context) {
          Map<String, YamlDataSourceParameter> result = new LinkedHashMap<>(context.getSqlStatement().getConnectionInfos().size(), 1);
          for (DataSourceConnectionSegment each : context.getSqlStatement().getConnectionInfos()) {
              DataSourceParameter parameter = new DataSourceParameter();
              YamlDataSourceParameter dataSource = new YamlDataSourceParameter();
              dataSource.setUrl(context.getUrl(each));
              dataSource.setUsername(each.getUser());
              dataSource.setPassword(each.getPassword());
              dataSource.setMinPoolSize(parameter.getMinPoolSize());
              dataSource.setMaxPoolSize(parameter.getMaxPoolSize());
              dataSource.setConnectionTimeoutMilliseconds(parameter.getConnectionTimeoutMilliseconds());
              dataSource.setIdleTimeoutMilliseconds(parameter.getIdleTimeoutMilliseconds());
              dataSource.setMaintenanceIntervalMilliseconds(parameter.getMaintenanceIntervalMilliseconds());
              result.put(each.getName(), dataSource);
          }
          return result;
      }
focal_method.class_method_signature: CreateDataSourcesStatementContextConverter.convert(final CreateDataSourcesStatementContext context)
focal_method.full_signature: @Override public Map<String, YamlDataSourceParameter> convert(final CreateDataSourcesStatementContext context)
focal_method.identifier: convert
focal_method.invocations: size getConnectionInfos getSqlStatement getConnectionInfos getSqlStatement setUrl getUrl setUsername getUser setPassword getPassword setMinPoolSize getMinPoolSize setMaxPoolSize getMaxPoolSize setConnectionTimeoutMilliseconds getConnectionTimeoutMilliseconds setIdleTimeoutMilliseconds getIdleTimeoutMilliseconds setMaintenanceIntervalMilliseconds getMaintenanceIntervalMilliseconds put getName
focal_method.modifiers: @Override public
focal_method.parameters: (final CreateDataSourcesStatementContext context)
focal_method.return: Map<String, YamlDataSourceParameter>
focal_method.signature: Map<String, YamlDataSourceParameter> convert(final CreateDataSourcesStatementContext context)