From: "n.pettik" <korablev@tarantool.org> To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> Subject: [tarantool-patches] Re: [PATCH 8/9] sql: make LIKE predicate return boolean result Date: Thu, 18 Apr 2019 20:55:41 +0300 [thread overview] Message-ID: <BB69349E-1E1C-4CA0-94CA-2BB066A9E4AF@tarantool.org> (raw) In-Reply-To: <851f5d59-c3ce-fea4-ecbe-463525436f8e@tarantool.org> >> diff --git a/src/box/sql/func.c b/src/box/sql/func.c >> index 860cd8920..baa739ba4 100644 >> --- a/src/box/sql/func.c >> +++ b/src/box/sql/func.c >> @@ -974,7 +974,7 @@ likeFunc(sql_context *context, int argc, sql_value **argv) >> sql_result_error(context, err_msg, -1); >> return; >> } >> - sql_result_int(context, res == MATCH); >> + sql_result_boolean(context, res == MATCH); > > Probably we should either contract all the names, > or do not contract any. Here the name was contracted: 'int', > not 'integer'. Then it should be 'bool', not 'boolean'. diff --git a/src/box/sql/func.c b/src/box/sql/func.c index 268a4768a..238bd8e03 100644 --- a/src/box/sql/func.c +++ b/src/box/sql/func.c @@ -974,7 +974,7 @@ likeFunc(sql_context *context, int argc, sql_value **argv) sql_result_error(context, err_msg, -1); return; } - sql_result_boolean(context, res == MATCH); + sql_result_bool(context, res == MATCH); } /* diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index a74fa4b9e..7dbca2a63 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -499,7 +499,7 @@ void sql_result_int(sql_context *, int); void -sql_result_boolean(sql_context *ctx, bool value); +sql_result_bool(sql_context *ctx, bool value); void sql_result_int64(sql_context *, sql_int64); diff --git a/src/box/sql/vdbeInt.h b/src/box/sql/vdbeInt.h index 8e161c00c..7951ba91a 100644 --- a/src/box/sql/vdbeInt.h +++ b/src/box/sql/vdbeInt.h @@ -497,7 +497,7 @@ int sqlVdbeMemSetStr(Mem *, const char *, int, u8, void (*)(void *)); void sqlVdbeMemSetInt64(Mem *, i64); void -vdbe_mem_set_boolean(struct Mem *mem, bool value); +vdbe_mem_set_bool(struct Mem *mem, bool value); #ifdef SQL_OMIT_FLOATING_POINT #define sqlVdbeMemSetDouble sqlVdbeMemSetInt64 diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c index 18f7587c3..e4dad3584 100644 --- a/src/box/sql/vdbeapi.c +++ b/src/box/sql/vdbeapi.c @@ -387,9 +387,9 @@ sql_result_int(sql_context * pCtx, int iVal) } void -sql_result_boolean(sql_context *ctx, bool value) +sql_result_bool(sql_context *ctx, bool value) { - vdbe_mem_set_boolean(ctx->pOut, value); + vdbe_mem_set_bool(ctx->pOut, value); } void diff --git a/src/box/sql/vdbemem.c b/src/box/sql/vdbemem.c index 1590a3550..69aea5ef5 100644 --- a/src/box/sql/vdbemem.c +++ b/src/box/sql/vdbemem.c @@ -803,7 +803,7 @@ sqlVdbeMemSetInt64(Mem * pMem, i64 val) } void -vdbe_mem_set_boolean(struct Mem *mem, bool value) +vdbe_mem_set_bool(struct Mem *mem, bool value) {
next prev parent reply other threads:[~2019-04-18 17:55 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-14 15:03 [tarantool-patches] [PATCH 0/9] Introduce type BOOLEAN in SQL Nikita Pettik 2019-04-14 15:03 ` [tarantool-patches] [PATCH 1/9] sql: refactor mem_apply_numeric_type() Nikita Pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 2/9] sql: disallow text values participate in sum() aggregate Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 3/9] sql: use msgpack types instead of custom ones Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 4/9] sql: introduce type boolean Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-23 21:06 ` Vladislav Shpilevoy 2019-04-14 15:04 ` [tarantool-patches] [PATCH 5/9] sql: improve type determination for column meta Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 6/9] sql: make comparison predicate return boolean Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:54 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 7/9] sql: make predicates accept and " Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:55 ` n.pettik 2019-04-14 15:04 ` [tarantool-patches] [PATCH 9/9] sql: make <search condition> accept only boolean Nikita Pettik 2019-04-16 14:12 ` [tarantool-patches] " Vladislav Shpilevoy 2019-04-18 17:55 ` n.pettik 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:59 ` n.pettik 2019-04-23 21:06 ` Vladislav Shpilevoy 2019-04-23 22:01 ` n.pettik [not found] ` <b2a84f129c2343d3da3311469cbb7b20488a21c2.1555252410.git.korablev@tarantool.org> 2019-04-16 14:12 ` [tarantool-patches] Re: [PATCH 8/9] sql: make LIKE predicate return boolean result Vladislav Shpilevoy 2019-04-18 17:55 ` n.pettik [this message] 2019-04-22 18:02 ` Vladislav Shpilevoy 2019-04-23 19:58 ` n.pettik 2019-04-24 10:28 ` [tarantool-patches] Re: [PATCH 0/9] Introduce type BOOLEAN in SQL Vladislav Shpilevoy 2019-04-25 8:46 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=BB69349E-1E1C-4CA0-94CA-2BB066A9E4AF@tarantool.org \ --to=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --cc=v.shpilevoy@tarantool.org \ --subject='[tarantool-patches] Re: [PATCH 8/9] sql: make LIKE predicate return boolean result' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox