use of com.torodb.torod.pipeline.InsertPipeline in project torodb by torodb.
the class SqlWriteTorodTransaction method insert.
@Override
public void insert(String db, String collection, Stream<KvDocument> documents) throws RollbackException, UserException {
Preconditions.checkState(!isClosed());
MutableMetaDatabase metaDb = getOrCreateMetaDatabase(db);
MutableMetaCollection metaCol = getOrCreateMetaCollection(metaDb, collection);
//TODO: here we can not use a pipeline
InsertPipeline pipeline = getConnection().getServer().getInsertPipelineFactory().createInsertPipeline(getConnection().getServer().getD2RTranslatorFactory(), metaDb, metaCol, getInternalTransaction().getBackendTransaction(), concurrent);
pipeline.insert(documents);
}
Aggregations