>>> Note that I'm going to implement a file-based API soon, as I think
>>> that is easier to handle for end users:
>>> https://github.com/jOOQ/jOOQ/issues/2208
>>>
>>> A draft implementation is already included in 3.0-RC1
>>
>> How about a parser that can read the output of Record.toString()? That would
>> make it dead simple to produce the test data (just run the query once
>> against a real database).
>
> Hmm, currently, Record.toString() and Result.toString() do some
> formatting, which involve truncating of data to at most 50 characters
> (indicating that fact with ellipses : ...)
> But I can see your point of having a two-way serialisation /
> deserialisation mechanism, that could be re-usable. At least to a
> certain extent (data type information is missing from serialised
> tables).
>
> I'll think about this, and add a comment to #2208

Note, that your idea led to me thinking that it should be possible to
load all sorts of formats that are supported by jOOQ:
http://www.jooq.org/doc/3.0/manual/sql-execution/exporting/

Executor.fetchFromXML(): https://github.com/jOOQ/jOOQ/issues/2233
Executor.fetchFromJSON(): https://github.com/jOOQ/jOOQ/issues/2234
Executor.fetchFromCSV(): Exists already, since jOOQ 2.4
Executor.fetchFromTXT(): https://github.com/jOOQ/jOOQ/issues/2235

In particular, loading from TXT should be somewhat lenient. The reason
why I started implementing the MockFileDatabase in an H2-integration
test style is because it is just simpler to manually write that H2
result set format (without all the border lines: +---+-----+, etc)

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to