Get type of primary key out of table_info

This commit is contained in:
Alexey Romanov
2010-10-12 11:45:28 +04:00
parent 16b7f15eed
commit b29185e601
2 changed files with 2 additions and 2 deletions

View File

@@ -603,7 +603,7 @@ build_table_info([], Acc) ->
build_table_info([[ColName, ColType] | Tl], Acc) ->
build_table_info(Tl, [{list_to_atom(ColName), sqlite3_lib:col_type_to_atom(ColType)}| Acc]);
build_table_info([[ColName, ColType, "PRIMARY", "KEY"] | Tl], Acc) ->
build_table_info(Tl, [{list_to_atom(ColName), primary_key} | Acc]).
build_table_info(Tl, [{list_to_atom(ColName), sqlite3_lib:col_type_to_atom(ColType), primary_key} | Acc]).
%%--------------------------------------------------------------------
%% @type sql_value() = number() | 'null' | iodata().