mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-02 08:55:56 +08:00
* Add log to debug #678 * Rename nsg_mix to RNSG in C++ sdk #735 * [skip ci] change __function__ * clang-format * #766 If partition tag is similar, wrong partition is searched * #766 If partition tag is similar, wrong partition is searched * reorder changelog id * typo * define interface * Define interface (#832) * If partition tag is similar, wrong partition is searched (#825) * #766 If partition tag is similar, wrong partition is searched * #766 If partition tag is similar, wrong partition is searched * reorder changelog id * typo * define interface Attach files by dragging & dropping, selecting or pasting them. Co-authored-by: groot <yihua.mo@zilliz.com> * faiss & knowhere * faiss & knowhere (#842) * Add log to debug #678 * Rename nsg_mix to RNSG in C++ sdk #735 * [skip ci] change __function__ * clang-format * If partition tag is similar, wrong partition is searched (#825) * #766 If partition tag is similar, wrong partition is searched * #766 If partition tag is similar, wrong partition is searched * reorder changelog id * typo * faiss & knowhere Co-authored-by: groot <yihua.mo@zilliz.com> * support binary input * code lint * add wrapper interface * add knowhere unittest * sdk support binary * support using metric tanimoto and hamming * sdk binary insert/query example * fix bug * fix bug * update wrapper * format * Improve unittest and fix bugs * delete printresult * fix bug * #823 Support binary vector tanimoto metric * fix typo * dimension limit to 32768 * fix * dimension limit to 32768 * fix describe index bug * fix #886 * fix #889 * add jaccard cases * hamming dev-test case * change test_connect * Add tanimoto cases * change the output type of hamming * add abs * merge master * rearrange changelog id * modify feature description Co-authored-by: Yukikaze-CZR <48198922+Yukikaze-CZR@users.noreply.github.com> Co-authored-by: Tinkerrr <linxiaojun.cn@outlook.com>
120 lines
3.3 KiB
C++
120 lines
3.3 KiB
C++
// Licensed to the Apache Software Foundation (ASF) under one
|
|
// or more contributor license agreements. See the NOTICE file
|
|
// distributed with this work for additional information
|
|
// regarding copyright ownership. The ASF licenses this file
|
|
// to you under the Apache License, Version 2.0 (the
|
|
// "License"); you may not use this file except in compliance
|
|
// with the License. You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing,
|
|
// software distributed under the License is distributed on an
|
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
// KIND, either express or implied. See the License for the
|
|
// specific language governing permissions and limitations
|
|
// under the License.
|
|
|
|
#pragma once
|
|
|
|
#include "MilvusApi.h"
|
|
#include "../grpc/ClientProxy.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace milvus {
|
|
|
|
class ConnectionImpl : public Connection {
|
|
public:
|
|
ConnectionImpl();
|
|
|
|
// Implementations of the Connection interface
|
|
Status
|
|
Connect(const ConnectParam& param) override;
|
|
|
|
Status
|
|
Connect(const std::string& uri) override;
|
|
|
|
Status
|
|
Connected() const override;
|
|
|
|
Status
|
|
Disconnect() override;
|
|
|
|
Status
|
|
CreateTable(const TableSchema& param) override;
|
|
|
|
bool
|
|
HasTable(const std::string& table_name) override;
|
|
|
|
Status
|
|
DropTable(const std::string& table_name) override;
|
|
|
|
Status
|
|
CreateIndex(const IndexParam& index_param) override;
|
|
|
|
Status
|
|
Insert(const std::string& table_name, const std::string& partition_tag, const std::vector<RowRecord>& record_array,
|
|
std::vector<int64_t>& id_array) override;
|
|
|
|
Status
|
|
Search(const std::string& table_name, const std::vector<std::string>& partition_tags,
|
|
const std::vector<RowRecord>& query_record_array, const std::vector<Range>& query_range_array, int64_t topk,
|
|
int64_t nprobe, TopKQueryResult& topk_query_result) override;
|
|
|
|
Status
|
|
DescribeTable(const std::string& table_name, TableSchema& table_schema) override;
|
|
|
|
Status
|
|
CountTable(const std::string& table_name, int64_t& row_count) override;
|
|
|
|
Status
|
|
ShowTables(std::vector<std::string>& table_array) override;
|
|
|
|
std::string
|
|
ClientVersion() const override;
|
|
|
|
std::string
|
|
ServerVersion() const override;
|
|
|
|
std::string
|
|
ServerStatus() const override;
|
|
|
|
std::string
|
|
DumpTaskTables() const override;
|
|
|
|
Status
|
|
DeleteByDate(const std::string& table_name, const Range& range) override;
|
|
|
|
Status
|
|
PreloadTable(const std::string& table_name) const override;
|
|
|
|
Status
|
|
DescribeIndex(const std::string& table_name, IndexParam& index_param) const override;
|
|
|
|
Status
|
|
DropIndex(const std::string& table_name) const override;
|
|
|
|
Status
|
|
CreatePartition(const PartitionParam& param) override;
|
|
|
|
Status
|
|
ShowPartitions(const std::string& table_name, PartitionList& partition_array) const override;
|
|
|
|
Status
|
|
DropPartition(const PartitionParam& param) override;
|
|
|
|
Status
|
|
GetConfig(const std::string& node_name, std::string& value) const override;
|
|
|
|
Status
|
|
SetConfig(const std::string& node_name, const std::string& value) const override;
|
|
|
|
private:
|
|
std::shared_ptr<ClientProxy> client_proxy_;
|
|
};
|
|
|
|
} // namespace milvus
|