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
da069513
Commit
da069513
authored
12 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
client-update: method printer update, update operation partly
implemented (hexademical output needed)
parent
38b8e8e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/tarantool/tc_print.c
+35
-5
35 additions, 5 deletions
client/tarantool/tc_print.c
with
35 additions
and
5 deletions
client/tarantool/tc_print.c
+
35
−
5
View file @
da069513
...
...
@@ -127,11 +127,41 @@ tc_printer_sql(struct tnt_xlog_header_v11 *hdr,
printf
(
"
\n
"
);
break
;
case
TNT_OP_DELETE
:
printf
(
"delete from t
0 where k
%"
PRIu32
" = "
,
r
->
r
.
del
.
h
.
ns
);
printf
(
"delete from t%"
PRIu32
"
where k0
= "
,
r
->
r
.
del
.
h
.
ns
);
tc_printer_sql_tuple
(
&
r
->
r
.
del
.
t
);
printf
(
"
\n
"
);
break
;
case
TNT_OP_UPDATE
:
case
TNT_OP_UPDATE
:
{
printf
(
"update t%"
PRIu32
" set "
,
r
->
r
.
update
.
h
.
ns
);
int
i
=
0
;
while
(
i
<
r
->
r
.
update
.
opc
)
{
struct
tnt_request_update_op
*
op
=
&
r
->
r
.
update
.
opv
[
i
];
switch
(
op
->
op
)
{
case
TNT_UPDATE_ASSIGN
:
/* XXX: hexademical data input needed */
break
;
case
TNT_UPDATE_ADD
:
break
;
case
TNT_UPDATE_AND
:
break
;
case
TNT_UPDATE_XOR
:
break
;
case
TNT_UPDATE_OR
:
break
;
case
TNT_UPDATE_SPLICE
:
break
;
case
TNT_UPDATE_DELETE
:
break
;
case
TNT_UPDATE_INSERT
:
break
;
default:
break
;
}
i
++
;
}
break
;
}
default:
break
;
}
...
...
@@ -141,13 +171,13 @@ tc_printerf_t tc_print_getcb(const char *name)
{
if
(
name
==
NULL
)
return
tc_printer_tarantool
;
if
(
strcasecmp
(
name
,
"tarantool"
))
if
(
!
strcasecmp
(
name
,
"tarantool"
))
return
tc_printer_tarantool
;
else
if
(
strcasecmp
(
name
,
"sql"
))
if
(
!
strcasecmp
(
name
,
"sql"
))
return
tc_printer_sql
;
else
if
(
strcasecmp
(
name
,
"yaml"
))
if
(
!
strcasecmp
(
name
,
"yaml"
))
return
NULL
;
return
NULL
;
}
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