Continued support for constraints

This commit is contained in:
Alexey Romanov
2010-10-12 13:48:58 +04:00
parent e8e6470172
commit 2b4afbe1b6
4 changed files with 4076 additions and 3985 deletions

View File

@@ -616,7 +616,18 @@ build_constraints(["DEFAULT", DefaultValue | Tail]) -> [{default, sqlite3_lib:sq
% build_constraints(["CHECK", Check | Tail]) -> ...
% build_constraints(["REFERENCES", Check | Tail]) -> ...
conflict_clause(["ON", "CONFLICT", ResolutionString | Tail]) ->
Resolution = case ResolutionString of
"ROLLBACK" -> rollback;
"ABORT" -> abort;
"FAIL" -> fail;
"IGNORE" -> ignore;
"REPLACE" -> replace
end,
{{on_conflict, Resolution}, Tail};
conflict_clause(NoOnConflictClause) ->
{no_on_conflict, NoOnConflictClause}.
%%--------------------------------------------------------------------
%% @type sql_value() = number() | 'null' | iodata().
%%