All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aerospike.jdbc.query.TruncateQueryHandler Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
package com.aerospike.jdbc.query;

import com.aerospike.client.IAerospikeClient;
import com.aerospike.jdbc.model.AerospikeQuery;
import com.aerospike.jdbc.model.Pair;

import java.sql.ResultSet;
import java.sql.Statement;
import java.util.logging.Logger;

public class TruncateQueryHandler extends BaseQueryHandler {

    private static final Logger logger = Logger.getLogger(TruncateQueryHandler.class.getName());

    public TruncateQueryHandler(IAerospikeClient client, Statement statement) {
        super(client, statement);
    }

    @Override
    public Pair execute(AerospikeQuery query) {
        logger.info("TRUNCATE/DROP statement");
        client.truncate(null, query.getCatalog(), query.getSetName(), null);

        return new Pair<>(emptyRecordSet(query), 1);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy