MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / act_describe

Function act_describe

src/gpre/sql.cpp:2737–2772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2735//
2736
2737static act* act_describe()
2738{
2739 bool in_sqlda;
2740
2741 if (MSC_match(KW_INPUT))
2742 in_sqlda = true;
2743 else
2744 {
2745 MSC_match(KW_OUTPUT);
2746 in_sqlda = false;
2747 }
2748
2749 dyn* statement = par_statement();
2750
2751 if (!MSC_match(KW_INTO))
2752 {
2753 // check for SQL2 syntax
2754 // "USING SQL DESCRIPTOR sqlda"
2755
2756 if (!MSC_match(KW_USING) || !MSC_match(KW_SQL) || !MSC_match(KW_DESCRIPTOR))
2757 CPR_s_error("INTO or USING SQL DESCRIPTOR sqlda");
2758 }
2759 else if (MSC_match(KW_SQL) && !MSC_match(KW_DESCRIPTOR))
2760 CPR_s_error("INTO SQL DESCRIPTOR sqlda");
2761
2762 statement->dyn_sqlda = PAR_native_value(false, false);
2763 act* action = (act*) MSC_alloc(ACT_LEN);
2764 if (in_sqlda)
2765 action->act_type = ACT_dyn_describe_input;
2766 else
2767 action->act_type = ACT_dyn_describe;
2768 action->act_object = (ref*) statement;
2769 action->act_whenever = gen_whenever();
2770
2771 return action;
2772}
2773
2774
2775//____________________________________________________________

Callers 1

SQL_actionFunction · 0.85

Calls 6

MSC_matchFunction · 0.85
par_statementFunction · 0.85
CPR_s_errorFunction · 0.85
PAR_native_valueFunction · 0.85
MSC_allocFunction · 0.85
gen_wheneverFunction · 0.70

Tested by

no test coverage detected