Search in sources :

Example 1 with DefaultTextConfiguration

use of io.questdb.cutlass.text.DefaultTextConfiguration in project questdb by bluestreak01.

the class TypeManagerTest method createTypeManager.

private TypeManager createTypeManager(String fileResource) throws JsonException {
    InputFormatConfiguration inputFormatConfiguration = new InputFormatConfiguration(new DateFormatFactory(), DateLocaleFactory.INSTANCE, new TimestampFormatFactory(), DateFormatUtils.enLocale);
    inputFormatConfiguration.parseConfiguration(jsonLexer, fileResource);
    return new TypeManager(new DefaultTextConfiguration(fileResource), utf8Sink);
}
Also used : DateFormatFactory(io.questdb.std.datetime.millitime.DateFormatFactory) TimestampFormatFactory(io.questdb.std.datetime.microtime.TimestampFormatFactory) DefaultTextConfiguration(io.questdb.cutlass.text.DefaultTextConfiguration)

Example 2 with DefaultTextConfiguration

use of io.questdb.cutlass.text.DefaultTextConfiguration in project questdb by bluestreak01.

the class TypeManagerTest method testIllegalParameterForGetTypeAdapter.

private void testIllegalParameterForGetTypeAdapter(int columnType) {
    TextConfiguration textConfiguration = new DefaultTextConfiguration();
    TypeManager typeManager = new TypeManager(textConfiguration, utf8Sink);
    try {
        typeManager.getTypeAdapter(columnType);
        Assert.fail();
    } catch (CairoException e) {
        TestUtils.assertContains(e.getFlyweightMessage(), "no adapter for type");
    }
}
Also used : DefaultTextConfiguration(io.questdb.cutlass.text.DefaultTextConfiguration) CairoException(io.questdb.cairo.CairoException) TextConfiguration(io.questdb.cutlass.text.TextConfiguration) DefaultTextConfiguration(io.questdb.cutlass.text.DefaultTextConfiguration)

Aggregations

DefaultTextConfiguration (io.questdb.cutlass.text.DefaultTextConfiguration)2 CairoException (io.questdb.cairo.CairoException)1 TextConfiguration (io.questdb.cutlass.text.TextConfiguration)1 TimestampFormatFactory (io.questdb.std.datetime.microtime.TimestampFormatFactory)1 DateFormatFactory (io.questdb.std.datetime.millitime.DateFormatFactory)1