[tarantool-patches] Re: [PATCH v7 5/7] sql: change sqlite3AddCheckConstraint signature

n.pettik korablev at tarantool.org
Tue May 29 14:51:04 MSK 2018


Hello. I have checked out last version on branch.
I can provide only a few codestyle nitpickings.

>--- a/src/box/sql/build.c
>+++ b/src/box/sql/build.c
>@@ -1019,26 +1019,22 @@ sqlite3AddPrimaryKey(Parse * pParse,    /* Parsing context */
>        return;
>}
> 
>-/*
>- * Add a new CHECK constraint to the table currently under construction.
>- */
>void
>-sqlite3AddCheckConstraint(Parse * pParse,      /* Parsing context */
>-                         Expr * pCheckExpr     /* The check expression */
>-    )
>+sql_add_check_constraint(Parse *parser, ExprSpan *span)

Lets use ‘struct’ prefix, as it should be according to codestyle.

>+       Table *table = parser->pNewTable;

The same.

>+++ b/src/box/sql/sqliteInt.h
>@@ -3504,7 +3504,15 @@ void sqlite3StartTable(Parse *, Token *, int);
> void sqlite3AddColumn(Parse *, Token *, Token *);
> void sqlite3AddNotNull(Parse *, int);
> void sqlite3AddPrimaryKey(Parse *, ExprList *, int, int, enum sort_order);
>-void sqlite3AddCheckConstraint(Parse *, Expr *);
>+
>+/**
>+ * Add a new CHECK constraint to the table currently under construction.

Out of 66 chars.





More information about the Tarantool-patches mailing list