ObjectDB ObjectDB

Debuging query before execution

#1

Hi,

Is is possible in any way to get string representation of a query right before execution, after setting parameters? Of course it's easy to print out query string when we build it by concatenating many strings, but even then we miss attributes.

edit
delete
#2

It seems that currently the toString method is not implemented so it should be relatively easy to add a useful implementation.

What exactly do you suggest? The query string with parameter values embedded, replacing the parameter names?

I think it would be better to generate a multi line string with the first line containing the query string, the second line containing the parameter arguments, etc.

What do you think?

ObjectDB Support
edit
delete
#3

The query string with embedded values would be nice for simple queries with up to 3 parameters. But for more complicated queries with many parameters this string could be too long.

On the other hand multi line query can be tough to read from log files. I was thinking about this functionality in context of debugging and logging. Because of that, I'm for single line query with embedded values.

edit
delete

Reply

To post on this website please sign in.