Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
23bf2b2b
Commit
23bf2b2b
authored
13 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
connector/c: removed old headers
parent
f375127e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
connector/c/include/tnt_proto.h
+0
-100
0 additions, 100 deletions
connector/c/include/tnt_proto.h
connector/c/include/tnt_update.h
+0
-131
0 additions, 131 deletions
connector/c/include/tnt_update.h
with
0 additions
and
231 deletions
connector/c/include/tnt_proto.h
deleted
100644 → 0
+
0
−
100
View file @
f375127e
#ifndef TNT_PROTO_H_INCLUDED
#define TNT_PROTO_H_INCLUDED
/*
* Copyright (C) 2011 Mail.RU
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#define TNT_PROTO_TYPE_INSERT 13
#define TNT_PROTO_TYPE_SELECT 17
#define TNT_PROTO_TYPE_UPDATE 19
#define TNT_PROTO_TYPE_DELETE 20
#define TNT_PROTO_TYPE_PING 65280
struct
tnt_proto_header
{
uint32_t
type
;
uint32_t
len
;
uint32_t
reqid
;
};
#define TNT_PROTO_IS_OK(V) ((V) == 0x0)
struct
tnt_proto_header_resp
{
struct
tnt_proto_header
hdr
;
uint32_t
code
;
};
struct
tnt_proto_tuple
{
uint32_t
card
;
unsigned
char
field
[];
};
#define TNT_PROTO_FLAG_RETURN 0x01
#define TNT_PROTO_FLAG_ADD 0x02
#define TNT_PROTO_FLAG_REPLACE 0x04
#define TNT_PROTO_FLAG_BOX_QUIET 0x08
#define TNT_PROTO_FLAG_NOT_STORE 0x10
struct
tnt_proto_insert
{
uint32_t
ns
;
uint32_t
flags
;
/* tuple data */
};
#define TNT_PROTO_UPDATE_ASSIGN 0
#define TNT_PROTO_UPDATE_ADD 1
#define TNT_PROTO_UPDATE_AND 2
#define TNT_PROTO_UPDATE_XOR 3
#define TNT_PROTO_UPDATE_OR 4
#define TNT_PROTO_UPDATE_SPLICE 5
#define TNT_PROTO_UPDATE_DELETE_FIELD 6
struct
tnt_proto_update
{
uint32_t
ns
;
uint32_t
flags
;
/* tuple data */
/* count */
/* operation */
};
struct
tnt_proto_update_op
{
uint32_t
field
;
unsigned
char
op
;
/* op_arg */
};
struct
tnt_proto_delete
{
uint32_t
ns
;
/* tuple data */
};
struct
tnt_proto_select
{
uint32_t
ns
;
uint32_t
index
;
uint32_t
offset
;
uint32_t
limit
;
/* tuple data */
};
#endif
/* TNT_PROTO_H_INCLUDED */
This diff is collapsed.
Click to expand it.
connector/c/include/tnt_update.h
deleted
100644 → 0
+
0
−
131
View file @
f375127e
#ifndef TNT_UPDATE_H_INCLUDED
#define TNT_UPDATE_H_INCLUDED
/*
* Copyright (C) 2011 Mail.RU
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/**
* @defgroup Update
* @ingroup Operations
* @brief Update operation
*/
enum
tnt_update_type
{
TNT_UPDATE_NONE
,
TNT_UPDATE_ASSIGN
,
TNT_UPDATE_ADD
,
TNT_UPDATE_AND
,
TNT_UPDATE_XOR
,
TNT_UPDATE_OR
,
TNT_UPDATE_SPLICE
,
TNT_UPDATE_DELETE_FIELD
};
/** @} */
struct
tnt_update_op
{
uint8_t
op
;
uint32_t
field
;
char
*
data
;
uint32_t
size
;
uint32_t
size_leb
;
STAILQ_ENTRY
(
tnt_update_op
)
next
;
};
struct
tnt_update
{
uint32_t
count
;
uint32_t
size_enc
;
STAILQ_HEAD
(,
tnt_update_op
)
list
;
};
/**
* @defgroup Handler
* @ingroup Update
* @brief Update handler initizalization and operations
*
* @{
*/
void
tnt_update_init
(
struct
tnt_update
*
update
);
void
tnt_update_free
(
struct
tnt_update
*
update
);
enum
tnt_error
tnt_update_assign
(
struct
tnt_update
*
update
,
int
field
,
char
*
value
,
int
value_size
);
enum
tnt_error
tnt_update_arith
(
struct
tnt_update
*
update
,
int
field
,
enum
tnt_update_type
op
,
int
value
);
enum
tnt_error
tnt_update_splice
(
struct
tnt_update
*
update
,
int
field
,
int
offset
,
int
length
,
char
*
list
,
int
list_size
);
enum
tnt_error
tnt_update_delete_field
(
struct
tnt_update
*
update
,
int
field
);
/** @} */
/**
* @defgroup Operation
* @ingroup Update
* @brief Update operation
*
* @{
*/
/**
* Update operation with tuple.
*
* If bufferization is in use, then request would be placed in
* internal buffer for later sending. Otherwise, operation
* would be processed immediately.
*
* @param t handler pointer
* @param reqid user supplied integer value
* @param ns namespace number
* @param flags update operation flags
* @param key tuple object pointer
* @param update update handler
* @returns 0 on success, -1 on error
*/
int
tnt_update_tuple
(
struct
tnt
*
t
,
int
reqid
,
int
ns
,
int
flags
,
struct
tnt_tuple
*
key
,
struct
tnt_update
*
update
);
/**
* Update operation.
*
* If bufferization is in use, then request would be placed in
* internal buffer for later sending. Otherwise, operation
* would be processed immediately.
*
* @param t handler pointer
* @param reqid user supplied integer value
* @param ns namespace number
* @param flags update operation flags
* @param key key data
* @param key key data size
* @param update update handler
* @returns 0 on success, -1 on error
*/
int
tnt_update
(
struct
tnt
*
t
,
int
reqid
,
int
ns
,
int
flags
,
char
*
key
,
int
key_size
,
struct
tnt_update
*
update
);
/** @} */
#endif
/* TNT_UPDATE_H_INCLUDED */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment