Search in sources :

Example 51 with StringSink

use of com.questdb.std.str.StringSink in project questdb by bluestreak01.

the class ColumnType method columnTypeOf.

public static int columnTypeOf(CharSequence name) {
    StringSink b = caseConverterBuffer.get();
    b.clear();
    for (int i = 0, n = name.length(); i < n; i++) {
        b.put(Character.toUpperCase(name.charAt(i)));
    }
    return nameTypeMap.get(b);
}
Also used : StringSink(com.questdb.std.str.StringSink)

Example 52 with StringSink

use of com.questdb.std.str.StringSink in project questdb by bluestreak01.

the class Signature method userReadable.

public CharSequence userReadable() {
    StringSink b = Misc.getThreadLocalBuilder();
    b.put('\'');
    b.put(name);
    b.put('\'');
    b.put('(');
    for (int i = 0, n = paramCount; i < n; i++) {
        if (i > 0) {
            b.put(", ");
        }
        if (constParams.getQuick(i) == 1) {
            b.put("const ");
        }
        b.put(ColumnType.nameOf(paramTypes.getQuick(i)));
    }
    b.put(')');
    return b;
}
Also used : StringSink(com.questdb.std.str.StringSink)

Aggregations

StringSink (com.questdb.std.str.StringSink)52 Test (org.junit.Test)35 RecordSourcePrinter (com.questdb.ql.RecordSourcePrinter)14 BootstrapEnv (com.questdb.BootstrapEnv)11 ServerConfiguration (com.questdb.ServerConfiguration)11 DirectByteCharSequence (com.questdb.std.str.DirectByteCharSequence)10 AbstractJournalTest (com.questdb.net.ha.AbstractJournalTest)9 ImportHandler (com.questdb.net.http.handlers.ImportHandler)9 QueryCompiler (com.questdb.parser.sql.QueryCompiler)9 AbstractTest (com.questdb.test.tools.AbstractTest)7 RecordSource (com.questdb.ql.RecordSource)5 Rnd (com.questdb.std.Rnd)5 CountDownLatch (java.util.concurrent.CountDownLatch)5 Album (com.questdb.model.Album)4 Band (com.questdb.model.Band)4 SelectedColumnsRecordSource (com.questdb.ql.select.SelectedColumnsRecordSource)4 JournalEntryWriter (com.questdb.store.JournalEntryWriter)4 RecordColumnMetadata (com.questdb.common.RecordColumnMetadata)3 RecordCursor (com.questdb.common.RecordCursor)3 Quote (com.questdb.model.Quote)3