MYDDAS: Added db_sql_mode/1 and db_sql_mode/2 predicates
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1885 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
530df10f5c
commit
ed7873ef8a
@ -15,6 +15,7 @@
|
|||||||
* *
|
* *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
#if defined MYDDAS_MYSQL || defined MYDDAS_ODBC
|
||||||
|
|
||||||
/* Initialize MYDDAS GLOBAL STRUCTURES */
|
/* Initialize MYDDAS GLOBAL STRUCTURES */
|
||||||
:- c_db_initialize_myddas.
|
:- c_db_initialize_myddas.
|
||||||
@ -92,7 +93,9 @@
|
|||||||
db_call_procedure/4,
|
db_call_procedure/4,
|
||||||
db_call_procedure/3,
|
db_call_procedure/3,
|
||||||
db_my_sql_mode/1,
|
db_my_sql_mode/1,
|
||||||
db_my_sql_mode/2
|
db_my_sql_mode/2,
|
||||||
|
db_sql_mode/1,
|
||||||
|
db_sql_mode/2
|
||||||
#endif
|
#endif
|
||||||
]).
|
]).
|
||||||
|
|
||||||
@ -134,8 +137,10 @@
|
|||||||
db_call_procedure/4,
|
db_call_procedure/4,
|
||||||
db_call_procedure/3,
|
db_call_procedure/3,
|
||||||
db_my_sql_mode/1,
|
db_my_sql_mode/1,
|
||||||
db_my_sql_mode/2
|
db_my_sql_mode/2,
|
||||||
]).
|
db_sql_mode/1,
|
||||||
|
db_sql_mode/2
|
||||||
|
]).
|
||||||
#endif /* MYDDAS_MYSQL */
|
#endif /* MYDDAS_MYSQL */
|
||||||
|
|
||||||
:- use_module(myddas_util_predicates,[
|
:- use_module(myddas_util_predicates,[
|
||||||
@ -568,4 +573,4 @@ db_multi_queries_number(Connection,Number) :-
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
|
|
||||||
|
|
||||||
|
#endif /*MYDDAS_MYSQL || MYDDAS_ODBC*/
|
||||||
|
@ -33,7 +33,9 @@
|
|||||||
db_call_procedure/4,
|
db_call_procedure/4,
|
||||||
db_call_procedure/3,
|
db_call_procedure/3,
|
||||||
db_my_sql_mode/1,
|
db_my_sql_mode/1,
|
||||||
db_my_sql_mode/2
|
db_my_sql_mode/2,
|
||||||
|
db_sql_mode/1,
|
||||||
|
db_sql_mode/2
|
||||||
]).
|
]).
|
||||||
|
|
||||||
:- use_module(myddas,[
|
:- use_module(myddas,[
|
||||||
@ -218,6 +220,11 @@ db_call_procedure(Connection,Procedure,Args,LA) :-
|
|||||||
% db_my_sql_mode/1
|
% db_my_sql_mode/1
|
||||||
% db_my_sql_mode/2
|
% db_my_sql_mode/2
|
||||||
% Possible values : traditional,ansi,strict_trans_tables or '' (empty)
|
% Possible values : traditional,ansi,strict_trans_tables or '' (empty)
|
||||||
|
db_sql_mode(SQLMode):-
|
||||||
|
db_my_sql_mode(SQLMode).
|
||||||
|
db_sql_mode(Connection,SQLMode):-
|
||||||
|
db_my_sql_mode(Connection,SQLMode).
|
||||||
|
|
||||||
db_my_sql_mode(SQLMode):-
|
db_my_sql_mode(SQLMode):-
|
||||||
db_my_sql_mode(myddas,SQLMode).
|
db_my_sql_mode(myddas,SQLMode).
|
||||||
db_my_sql_mode(Connection,SQLMode):-
|
db_my_sql_mode(Connection,SQLMode):-
|
||||||
|
@ -89,7 +89,7 @@ translate(ProjectionTerm,DatabaseGoal,SQLQueryTermOpt):-
|
|||||||
|
|
||||||
% --- optimize sql ------------------------------------------------------------------
|
% --- optimize sql ------------------------------------------------------------------
|
||||||
optimize_sql(SQLQueryTerm,SQLQueryTermOpt).
|
optimize_sql(SQLQueryTerm,SQLQueryTermOpt).
|
||||||
|
|
||||||
% --- disjunction(Goal,Disjunction) ----------------------------------------------------
|
% --- disjunction(Goal,Disjunction) ----------------------------------------------------
|
||||||
%
|
%
|
||||||
% turns original goal into disjunctive normalized form by computing all conjunctions
|
% turns original goal into disjunctive normalized form by computing all conjunctions
|
||||||
|
Reference in New Issue
Block a user