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

Function PRETTY_print_dyn

src/common/pretty.cpp:183–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181
182
183int PRETTY_print_dyn(const UCHAR* blr, FPTR_PRINT_CALLBACK routine, void* user_arg, SSHORT language)
184//____________________________________________________________
185//
186// Pretty print dynamic DDL thru callback routine.
187//
188
189{
190 ctl ctl_buffer;
191 ctl* control = &ctl_buffer;
192
193 if (!routine)
194 {
195 routine = gds__default_printer;
196 user_arg = NULL;
197 }
198
199 control->ctl_routine = routine;
200 control->ctl_user_arg = user_arg;
201 control->ctl_blr = control->ctl_blr_start = blr;
202 control->ctl_ptr = control->ctl_buffer;
203 control->ctl_language = language;
204
205 const SSHORT version = BLR_BYTE;
206
207 SSHORT offset = 0;
208 if (version != isc_dyn_version_1)
209 return error(control, offset, "*** dyn version %d is not supported ***\n", version);
210
211 blr_format(control, "gds__dyn_version_1, ");
212 print_line(control, offset);
213 SSHORT level = 1;
214 PRINT_DYN_VERB;
215
216 if (BLR_BYTE != isc_dyn_eoc)
217 return error(control, offset, "*** expected dyn end-of-command ***\n", 0);
218
219 blr_format(control, "gds__dyn_eoc");
220 print_line(control, offset);
221
222 return 0;
223}
224
225
226int PRETTY_print_sdl(const UCHAR* blr, FPTR_PRINT_CALLBACK routine, void *user_arg, SSHORT language)

Callers 7

gen_requestFunction · 0.85
gen_requestFunction · 0.85
gen_request_dataFunction · 0.85
gen_requestFunction · 0.85
gen_requestFunction · 0.85
gen_requestFunction · 0.85
gen_requestFunction · 0.85

Calls 3

print_lineFunction · 0.85
errorFunction · 0.70
blr_formatFunction · 0.70

Tested by

no test coverage detected