<img src="https://griddb.org/brand-resources/griddb-logo/png/color.png" align="center" height="240" alt="GridDB"/>
# GridDB C Client
## Overview
The GridDB C Client provides a C interface for GridDB.
This repository also includes simple samples.
Please refer to [C API Reference](http://griddb.github.io/docs-en/manuals/GridDB_C_API_Reference.html) for detailed information.
## Operating environment
Library building and program execution are checked in the environment below.
OS: CentOS 7.9(x64) (gcc 10), Windows 10(x64) (VS2017, CMake 3.15.2)
GridDB server: V5.3 CE(Community Edition), CentOS 7.9(x64) (gcc 4.8.5)
OS: Ubuntu 20.04(x64) (gcc 10)
GridDB server: V5.3 CE(Community Edition), Ubuntu 18.04(x64) (gcc 4.8.5)
OS: MacOS Catalina 10.15 (clang 11.0.3)
GridDB server: V5.3 CE(Community Edition), CentOS 7.9(x64) (gcc 4.8.5)
## Quick start (CentOS, Ubuntu)
### Using source code
#### Build
Run the make command like the following:
$ cd client/c
$ ./bootstrap.sh
$ ./configure
$ make
and create the following file and links under the bin/ folder.
libgridstore.so
libgridstore.so.0
libgridstore.so.0.0.0
#### Execute a sample program
GridDB server need to be started in advance.
$ cp client/c/sample/sample1.c .
$ gcc -I./client/c/include -L./bin sample1.c -lgridstore
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:./bin
$ ./a.out <GridDB notification address(default is 239.0.0.1)> <GridDB notification port(default is 31999)>
<GridDB cluster name> <GridDB user> <GridDB password>
-->Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
(Additional information)
- The gridstore.h file on client/c/include folder is used for building.
- There are some samples on client/c/sample folder.
### Using RPM or DEB
#### Install
[CentOS, Ubuntu]
About installation information:
https://software.opensuse.org/download/package?project=home:knonomura&package=griddb-c-client
#### Execute a sample program
GridDB server need to be started in advance.
$ cp /usr/griddb_c_client-X.X.X/sample/sample1.c .
$ gcc sample1.c -lgridstore
$ ./a.out <GridDB notification address(default is 239.0.0.1)> <GridDB notification port(default is 31999)>
<GridDB cluster name> <GridDB user> <GridDB password>
-->Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
(Additional information)
- The gridstore.h file on /usr/include folder is used for building.
- The libgridstore.so file on /usr/lib64 (CentOS), /usr/lib/x86_64-linux-gnu (Ubuntu) folder is used for building and executing.
## Quick start (MacOS)
### Using source code
#### Build
Run the make command like the following:
$ cd client/c
$ ./bootstrap.sh
$ ./configure
$ make
and create the following file and links under the bin/ folder.
libgridstore.dylib
libgridstore.0.dylib
libgridstore.0.0.0.dylib
#### Execute a sample program
GridDB server need to be started in advance.
$ cp client/c/sample/sample1.c .
$ gcc -I./client/c/include -L./bin sample1.c -lgridstore
$ export DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}:./bin
$ ./a.out <GridDB notification address(default is 239.0.0.1)> <GridDB notification port(default is 31999)>
<GridDB cluster name> <GridDB user> <GridDB password>
-->Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
(Additional information)
- The gridstore.h file on client/c/include folder is used for building.
- There are some samples on client/c/sample folder.
## Quick start (Windows)
### Using source code
#### Generate standard build files from cmake
* Open CMAKE_PATH/bin/cmake-gui.exe.
* Set link for source code in cmake-gui: <C_CLIENT_SRC_PATH>\client\c\sample.
* Set link for the binaries in cmake-gui: link to folder which generated files are store (*.sln , *.vcxproj files) as <PATH_TO_OUTPUT_CMAKE>.
* Run Configure with set Specify the generator for this project is Visual Studio 15 2017 Win64.
* Run Generate to get standard build files.
#### Build with VS2017
Open <PATH_TO_OUTPUT_CMAKE>\client.sln by VS2017.
Choose build client solution to build c client.
Output at <C_CLIENT_SRC_PATH>\bin\x64\Release (build with Release mode, <C_CLIENT_SRC_PATH>\bin\x64\Debug if choose Debug mode).
gridstore_c.dll
gridstore_c.lib
#### Execute a sample program
GridDB server need to be started in advance.
After starting VS with <PATH_TO_OUTPUT_CMAKE>\sample.sln, build sample project.
A sample.exe is created under the <C_CLIENT_SRC_PATH>\bin\x64\Release folder (build with Release mode, <C_CLIENT_SRC_PATH>\bin\x64\Debug if choose Debug mode).
> sample.exe sample1 en <GridDB notification address(default is 239.0.0.1)> <GridDB notification port(default is 31999)>
<GridDB cluster name> <GridDB user> <GridDB password>
-->Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
(Additional information)
- The gridstore.h file on client/c/include folder is used for building.
- There are some samples on client/c/sample folder.
### Using MSI
#### Install
Install the MSI package (https://github.com/griddb/c_client/releases), the package is extracted into C:/Program Files/GridDB/GridDB C Client/X.X.X folder.
#### How to create and build a sample program
Explains how to compile a program. The following is the procedure for VS2017.
* Create x64 project. Select [x64] in [Configuration Manager]-[Active Solution Platform]-[New].
* Add sample1.c to the Source Files of the project.
* Include directory settings. Specify the directory where gridstore.h exists in [Configuration Properties]-[C / C ++]-[General]-[Additional Include Directories].
* Import library (gridstore_c.lib) settings. Add to [Linker]-[Input]-[Additional Dependencies]
* Specify the directory where gridstore_c.lib exists in [Configuration Properties]-[Linker]-[General]-[Additional Library Directories].
* Build the sample project
#### Execute a sample program
GridDB server need to be started in advance.
After building VS sample project, build the project and run sample.exe.
> sample.exe <GridDB notification address(default is 239.0.0.1)> <GridDB notification port(default is 31999)>
<GridDB cluster name> <GridDB user> <GridDB password>
-->Person: name=name02 status=false count=2 lob=[65, 66, 67, 68, 69, 70, 71, 72, 73, 74]
## Document
Refer to the file below for more detailed information.
- [C API Reference](http://griddb.github.io/docs-en/manuals/GridDB_C_API_Reference.html)
Note: GEOMETRY type is not available for C Client CE(Community Edition).
## Community
* Issues
Use the GitHub issue function if you have any requests, questions, or bug reports.
* PullRequest
Use the GitHub pull request function if you want to contribute code.
You'll need to agree GridDB Contributor License Agreement(CLA_rev1.1.pdf).
By using the GitHub pull request function, you shall be deemed to have agreed to GridDB Contributor License Agreement.
## License
The C client source license is Apache License, version 2.0.
See 3rd_party/3rd_party.md for the source and license of the third party.
没有合适的资源?快使用搜索试试~ 我知道了~
GridDB C Client.zip
共254个文件
c:74个
h:42个
cpp:21个
需积分: 5 0 下载量 40 浏览量
2023-12-31
10:51:09
上传
评论
收藏 940KB ZIP 举报
温馨提示
GridDB C Client
资源推荐
资源详情
资源评论
收起资源包目录
GridDB C Client.zip (254个子文件)
configure.ac 2KB
Makefile.am 3KB
Makefile.am 3KB
Makefile.am 389B
generate_parser.bat 31B
sha2.c 31KB
ebb_request_parser.c 29KB
gen_uuid.c 15KB
gen_uuid.c 15KB
TQLTimeseries.c 9KB
CompositeKeyMultiGet.c 8KB
sample5.c 7KB
sample5.c 7KB
FetchAll.c 7KB
MultiGet.c 7KB
sample5.c 7KB
sample5.c 7KB
UpdateRowByTQL.c 7KB
RemoveRowByTQL.c 6KB
NanoTimestamp.c 6KB
TQLSelect.c 6KB
TQLAggregation.c 6KB
ArrayData.c 6KB
GetRow.c 6KB
MultiPut.c 6KB
tst_uuid.c 6KB
sha2speed.c 6KB
RemoveRowByRowkey.c 5KB
BlobData.c 5KB
CreateIndex.c 5KB
PutRows.c 5KB
PutRow.c 5KB
ContainerInformation.c 5KB
uuid_time.c 4KB
uuid_time.c 4KB
md5.c 4KB
sample4.c 4KB
sample4.c 4KB
TimeSeriesCompression.c 4KB
sample4.c 4KB
TimeSeriesRowExpiration.c 4KB
sample4.c 4KB
CreateCollectionByMethod.c 4KB
sha2prog.c 4KB
CreateTimeSeriesByMethod.c 4KB
CreateCollectionByClass.c 3KB
ContainerNames.c 3KB
sample1.c 3KB
sample1.c 3KB
Connect.c 3KB
sample1.c 3KB
sample1.c 3KB
sample3.c 3KB
sample3.c 3KB
unparse.c 2KB
unparse.c 2KB
sample3.c 2KB
sample3.c 2KB
parse.c 2KB
parse.c 2KB
pack.c 2KB
pack.c 2KB
compare.c 2KB
compare.c 2KB
sample2.c 2KB
sample2.c 2KB
unpack.c 2KB
unpack.c 2KB
sample2.c 2KB
sample2.c 2KB
isnull.c 2KB
isnull.c 2KB
copy.c 2KB
copy.c 2KB
clear.c 2KB
clear.c 2KB
gen_uuid_nt.c 2KB
main.c 940B
gen_uuid_nt2.c 543B
changelog 78B
debian.changelog 76B
debian.compat 3B
compat 3B
debian.control 497B
control 497B
COPYING 11KB
COPYING 1KB
COPYING 1KB
client.cpp 689KB
http.cpp 54KB
file.cpp 45KB
time.cpp 45KB
net.cpp 44KB
container_key.cpp 37KB
type.cpp 33KB
service_address.cpp 28KB
code.cpp 25KB
trace.cpp 22KB
authentication.cpp 14KB
thread.cpp 13KB
共 254 条
- 1
- 2
- 3
资源评论
暮苍梧~
- 粉丝: 41
- 资源: 258
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功