예제 #1
0
        public static BufferConverter GetConverter(MetadataIdentity metadata, ColumnMetadata columnMetadata)
        {
            CommandCacheKey cacheKey = new CommandCacheKey(metadata, columnMetadata);

            return(converterMap.GetOrAdd(cacheKey, k =>
            {
                CommandCompiler compiler = new CommandCompiler();

                return compiler.Compile(metadata, columnMetadata);
            }));
        }
예제 #2
0
        public static BufferWriter GetWriter(IReadOnlyList <ColumnName> columnNames)
        {
            CommandCacheKey cacheKey = new CommandCacheKey(columnNames);

            return(writerMap.GetOrAdd(cacheKey, k =>
            {
                CommandCompiler compiler = new CommandCompiler();

                return compiler.Compile(k.Columns);
            }));
        }