Top Description Fields Constructors Methods
org.jooq.impl

pack-priv abstract Class AbstractFormattable

extends Object
implements Formattable, Attachable
Class Inheritance
All Implemented Interfaces
org.jooq.Attachable, java.io.Serializable, org.jooq.Formattable
Known Direct Subclasses
org.jooq.impl.AbstractResult, org.jooq.impl.AbstractStore
Imports
java.io.OutputStream, .OutputStreamWriter, .StringWriter, .Writer, java.util.List, org.jooq.Attachable, .CSVFormat, .ChartFormat, .Configuration, .Field, .Formattable, .JSONFormat, .TXTFormat, .Table, .XMLFormat, org.w3c.dom.Document, org.xml.sax.ContentHandler, .SAXException

A common base implementation for Formattable, implementing all the various convenience overloads.
Author
Lukas Eder

Field Summary

Modifier and TypeField and Description
pack-priv Configuration

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public final void
attach(Configuration
A configuration or null, if you wish to detach this Attachable from its previous configuration.
c
)

Implements org.jooq.Attachable.attach.

Attach this object to a new Configuration.
public final Configuration
configuration()

Implements org.jooq.Attachable.configuration.

Get the currently attached Configuration, or null if no Configuration is attached.
pack-priv abstract JSONFormat
pack-priv abstract XMLFormat
public final void
detach()

Implements org.jooq.Attachable.detach.

Detach this object from its current Configuration.
public final String
format()

Implements org.jooq.Formattable.format.

Get a simple formatted representation of this result.
public final String
format(int
The maximum number of records to include in the formatted result
maxRecords
)

Implements org.jooq.Formattable.format.

Get a simple formatted representation of this result.
public final String
format(TXTFormat
The formatting information
format
)

Implements org.jooq.Formattable.format.

Get a simple formatted representation of this result.
public final void
format(OutputStream stream)

Implements org.jooq.Formattable.format.

Like format(), but the data is output onto an OutputStream.
public final void
format(OutputStream stream, int maxRecords)

Implements org.jooq.Formattable.format.

Like format(int), but the data is output onto an OutputStream.
public final void
format(OutputStream stream, TXTFormat format)

Implements org.jooq.Formattable.format.

Like format(TXTFormat), but the data is output onto an OutputStream.
public final void
format(Writer writer)

Implements org.jooq.Formattable.format.

Like format(), but the data is output onto a Writer.
public final void
format(Writer writer, int maxRecords)

Implements org.jooq.Formattable.format.

Like format(int), but the data is output onto a Writer.
public final String
formatChart()

Implements org.jooq.Formattable.formatChart.

Get this result as an ASCII chart.
public final String
formatChart(ChartFormat format)

Implements org.jooq.Formattable.formatChart.

Get this result as an ASCII chart.
public final void
formatChart(OutputStream stream)

Implements org.jooq.Formattable.formatChart.

Like formatChart(), but the data is output onto an OutputStream.
public final void
formatChart(OutputStream stream, ChartFormat format)

Implements org.jooq.Formattable.formatChart.

Like formatChart(ChartFormat), but the data is output onto an OutputStream.
public final void
formatChart(Writer writer)

Implements org.jooq.Formattable.formatChart.

Like formatChart(), but the data is output onto a Writer.
public final String
formatCSV()

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final String
formatCSV(boolean
Whether to emit a CSV header line
header
)

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final String
formatCSV(char
The delimiter to use between records
delimiter
)

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final String
formatCSV(boolean
Whether to emit a CSV header line
header
,
char
The delimiter to use between records
delimiter
)

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final String
formatCSV(char
The delimiter to use between records
delimiter
,
String
A special string for encoding NULL values.
nullString
)

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final String
formatCSV(boolean
Whether to emit a CSV header line
header
,
char
The delimiter to use between records
delimiter
,
String
A special string for encoding NULL values.
nullString
)

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final String
formatCSV(CSVFormat format)

Implements org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.
public final void
formatCSV(OutputStream stream)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(), but the data is output onto an OutputStream.
public final void
formatCSV(OutputStream stream, boolean header)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(boolean), but the data is output onto an OutputStream.
public final void
formatCSV(OutputStream stream, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(char), but the data is output onto an OutputStream.
public final void
formatCSV(OutputStream stream, boolean header, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char), but the data is output onto an OutputStream.
public final void
formatCSV(OutputStream stream, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(char, String), but the data is output onto an OutputStream.
public final void
formatCSV(OutputStream stream, boolean header, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char, String), but the data is output onto an OutputStream.
public final void
formatCSV(OutputStream stream, CSVFormat format)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(CSVFormat), but the data is output onto an OutputStream.
public final void
formatCSV(Writer writer)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(), but the data is output onto a Writer.
public final void
formatCSV(Writer writer, boolean header)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(boolean), but the data is output onto a Writer.
public final void
formatCSV(Writer writer, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(char), but the data is output onto a Writer.
public final void
formatCSV(Writer writer, boolean header, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char), but the data is output onto a Writer.
public final void
formatCSV(Writer writer, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(char, String), but the data is output onto a Writer.
public final void
formatCSV(Writer writer, boolean header, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char, String), but the data is output onto a Writer.
public final String
formatHTML()

Implements org.jooq.Formattable.formatHTML.

Get a simple formatted representation of this result as HTML.
public final void
formatHTML(OutputStream stream)

Implements org.jooq.Formattable.formatHTML.

Like formatHTML(), but the data is output onto an OutputStream.
public final String
formatInsert()

Implements org.jooq.Formattable.formatInsert.

Get this result as a set of INSERT statements.
public final void
formatInsert(OutputStream stream)

Implements org.jooq.Formattable.formatInsert.

Like formatInsert(), but the data is output onto an OutputStream.
public final String
formatInsert(Table<?> table, Field<?>... f)

Implements org.jooq.Formattable.formatInsert.

Deprecated as a consequence of Field being deprecated.
Get this result as a set of INSERT statements.
public final void
formatInsert(OutputStream stream, Table<?> table, Field<?>... f)

Implements org.jooq.Formattable.formatInsert.

Deprecated as a consequence of Field being deprecated.
Like formatInsert(Table, Field...), but the data is output onto an OutputStream.
public final String
formatJSON()

Implements org.jooq.Formattable.formatJSON.

Get a simple formatted representation of this result as a JSON array of array.
public final String
formatJSON(JSONFormat format)

Implements org.jooq.Formattable.formatJSON.

Get a simple formatted representation of this result as a JSON data structure, according to the format.
public final void
formatJSON(OutputStream stream)

Implements org.jooq.Formattable.formatJSON.

Like formatJSON(), but the data is output onto an OutputStream.
public final void
formatJSON(OutputStream stream, JSONFormat format)

Implements org.jooq.Formattable.formatJSON.

Like formatJSON(JSONFormat), but the data is output onto an OutputStream.
public final void
formatJSON(Writer writer)

Implements org.jooq.Formattable.formatJSON.

Like formatJSON(), but the data is output onto a Writer.
public final String
formatXML()

Implements org.jooq.Formattable.formatXML.

Get this result formatted as XML.
public final String
formatXML(XMLFormat format)

Implements org.jooq.Formattable.formatXML.

Get this result formatted as XML.
public final void
formatXML(OutputStream stream)

Implements org.jooq.Formattable.formatXML.

Like formatXML(), but the data is output onto an OutputStream.
public final void
formatXML(OutputStream stream, XMLFormat format)

Implements org.jooq.Formattable.formatXML.

Like formatXML(XMLFormat), but the data is output onto an OutputStream.
public final void
formatXML(Writer writer)

Implements org.jooq.Formattable.formatXML.

Like formatXML(), but the data is output onto a Writer.
pack-priv abstract List<? extends Attachable>
public final Document
intoXML()

Implements org.jooq.Formattable.intoXML.

Get this result as XML.
public final <H extends ContentHandler> H
intoXML(H
The custom content handler.
handler
)

Implements org.jooq.Formattable.intoXML.

Get this result as XML using a SAX ContentHandler.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configurationback to summary
pack-priv Configuration configuration

Constructor Detail

AbstractFormattableback to summary
pack-priv AbstractFormattable(Configuration configuration)

Method Detail

attachback to summary
public final void attach(Configuration c)

Implements org.jooq.Attachable.attach.

Doc from org.jooq.Attachable.attach.

Attach this object to a new Configuration.

Parameters
c:Configuration

A configuration or null, if you wish to detach this Attachable from its previous configuration.

Annotations
@Override
configurationback to summary
public final Configuration configuration()

Implements org.jooq.Attachable.configuration.

Doc from org.jooq.Attachable.configuration.

Get the currently attached Configuration, or null if no Configuration is attached.

Annotations
@Override
defaultJSONFormatback to summary
pack-priv abstract JSONFormat defaultJSONFormat()
defaultXMLFormatback to summary
pack-priv abstract XMLFormat defaultXMLFormat()
detachback to summary
public final void detach()

Implements org.jooq.Attachable.detach.

Doc from org.jooq.Attachable.detach.

Detach this object from its current Configuration.

This is the same as calling attach(null).

Annotations
@Override
formatback to summary
public final String format()

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Get a simple formatted representation of this result.

This is the same as calling format(int) with maxRows = Integer.MAX_VALUE

Returns:String

The formatted result

Annotations
@Override
formatback to summary
public final String format(int maxRecords)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Get a simple formatted representation of this result.

Parameters
maxRecords:int

The maximum number of records to include in the formatted result

Returns:String

The formatted result

Annotations
@Override
formatback to summary
public final String format(TXTFormat format)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Get a simple formatted representation of this result.

Parameters
format:TXTFormat

The formatting information

Returns:String

The formatted result

Annotations
@Override
formatback to summary
public final void format(OutputStream stream)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Like format(), but the data is output onto an OutputStream.

Annotations
@Override
formatback to summary
public final void format(OutputStream stream, int maxRecords)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Like format(int), but the data is output onto an OutputStream.

Annotations
@Override
formatback to summary
public final void format(OutputStream stream, TXTFormat format)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Like format(TXTFormat), but the data is output onto an OutputStream.

Annotations
@Override
formatback to summary
public final void format(Writer writer)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Like format(), but the data is output onto a Writer.

Annotations
@Override
formatback to summary
public final void format(Writer writer, int maxRecords)

Implements org.jooq.Formattable.format.

Doc from org.jooq.Formattable.format.

Like format(int), but the data is output onto a Writer.

Annotations
@Override
formatChartback to summary
public final String formatChart()

Implements org.jooq.Formattable.formatChart.

Doc from org.jooq.Formattable.formatChart.

Get this result as an ASCII chart.

Annotations
@Override
formatChartback to summary
public final String formatChart(ChartFormat format)

Implements org.jooq.Formattable.formatChart.

Doc from org.jooq.Formattable.formatChart.

Get this result as an ASCII chart.

When running a query like this:


String chart =
create.select(
           BOOK_TO_BOOK_STORE.BOOK_STORE_NAME,
           count(BOOK_TO_BOOK_STORE.BOOK_ID).as("books")
       )
       .from(BOOK_TO_BOOK_STORE)
       .groupBy(BOOK_TO_BOOK_STORE.BOOK_STORE_NAME)
       .fetch()
       .formatChart();
Where the formatted result would look like this:
+-------------------------+-----+
|BOOK_STORE_NAME          |books|
+-------------------------+-----+
|Buchhandlung im Volkshaus|    1|
|Ex Libris                |    2|
|Orell Füssli             |    3|
+-------------------------+-----+
Then the chart might look something like this:
3.00|                                                  █████████████████████████
2.91|                                                  █████████████████████████
2.82|                                                  █████████████████████████
2.73|                                                  █████████████████████████
2.64|                                                  █████████████████████████
2.55|                                                  █████████████████████████
2.45|                                                  █████████████████████████
2.36|                                                  █████████████████████████
2.27|                                                  █████████████████████████
2.18|                                                  █████████████████████████
2.09|                                                  █████████████████████████
2.00|                         ██████████████████████████████████████████████████
1.91|                         ██████████████████████████████████████████████████
1.82|                         ██████████████████████████████████████████████████
1.73|                         ██████████████████████████████████████████████████
1.64|                         ██████████████████████████████████████████████████
1.55|                         ██████████████████████████████████████████████████
1.45|                         ██████████████████████████████████████████████████
1.36|                         ██████████████████████████████████████████████████
1.27|                         ██████████████████████████████████████████████████
1.18|                         ██████████████████████████████████████████████████
1.09|                         ██████████████████████████████████████████████████
1.00|███████████████████████████████████████████████████████████████████████████
----+---------------------------------------------------------------------------
    | Buchhandlung im Volkshaus         Ex Libris               Orell Füssli
It is possible to specify a variety of ChartFormat formatting specifications, such as the width, height, display type (default, stacked, 100% stacked), the column index of the category and value columns, etc.
Annotations
@Override
formatChartback to summary
public final void formatChart(OutputStream stream)

Implements org.jooq.Formattable.formatChart.

Doc from org.jooq.Formattable.formatChart.

Like formatChart(), but the data is output onto an OutputStream.

Annotations
@Override
formatChartback to summary
public final void formatChart(OutputStream stream, ChartFormat format)

Implements org.jooq.Formattable.formatChart.

Doc from org.jooq.Formattable.formatChart.

Like formatChart(ChartFormat), but the data is output onto an OutputStream.

Annotations
@Override
formatChartback to summary
public final void formatChart(Writer writer)

Implements org.jooq.Formattable.formatChart.

Doc from org.jooq.Formattable.formatChart.

Like formatChart(), but the data is output onto a Writer.

Annotations
@Override
formatCSVback to summary
public final String formatCSV()

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(true, ',', "")

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final String formatCSV(boolean header)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(',', "")

Parameters
header:boolean

Whether to emit a CSV header line

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final String formatCSV(char delimiter)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(true, delimiter, "")

Parameters
delimiter:char

The delimiter to use between records

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final String formatCSV(boolean header, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(delimiter, "")

Parameters
header:boolean

Whether to emit a CSV header line

delimiter:char

The delimiter to use between records

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final String formatCSV(char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

This is the same as calling formatCSV(true, delimiter, nullString)

Parameters
delimiter:char

The delimiter to use between records

nullString:String

A special string for encoding NULL values.

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final String formatCSV(boolean header, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

Parameters
header:boolean

Whether to emit a CSV header line

delimiter:char

The delimiter to use between records

nullString:String

A special string for encoding NULL values.

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final String formatCSV(CSVFormat format)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Get a simple formatted representation of this result as CSV.

Returns:String

The formatted result

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream, boolean header)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(boolean), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(char), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream, boolean header, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(char, String), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream, boolean header, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char, String), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(OutputStream stream, CSVFormat format)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(CSVFormat), but the data is output onto an OutputStream.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(Writer writer)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(), but the data is output onto a Writer.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(Writer writer, boolean header)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(boolean), but the data is output onto a Writer.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(Writer writer, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(char), but the data is output onto a Writer.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(Writer writer, boolean header, char delimiter)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char), but the data is output onto a Writer.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(Writer writer, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(char, String), but the data is output onto a Writer.

Annotations
@Override
formatCSVback to summary
public final void formatCSV(Writer writer, boolean header, char delimiter, String nullString)

Implements org.jooq.Formattable.formatCSV.

Doc from org.jooq.Formattable.formatCSV.

Like formatCSV(boolean, char, String), but the data is output onto a Writer.

Annotations
@Override
formatHTMLback to summary
public final String formatHTML()

Implements org.jooq.Formattable.formatHTML.

Doc from org.jooq.Formattable.formatHTML.

Get a simple formatted representation of this result as HTML.

The HTML code is formatted as follows:


<table>
  <thead>
    <tr>
      <th>field-1</th>
      <th>field-2</th>
      ...
      <th>field-n</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>value-1-1</th>
      <th>value-1-2</th>
      ...
      <th>value-1-n</th>
    </tr>
    <tr>
      <th>value-2-1</th>
      <th>value-2-2</th>
      ...
      <th>value-2-n</th>
    </tr>
    ...
  </tbody>
</table>
Returns:String

The formatted result

Annotations
@Override
formatHTMLback to summary
public final void formatHTML(OutputStream stream)

Implements org.jooq.Formattable.formatHTML.

Doc from org.jooq.Formattable.formatHTML.

Like formatHTML(), but the data is output onto an OutputStream.

Annotations
@Override
formatInsertback to summary
public final String formatInsert()

Implements org.jooq.Formattable.formatInsert.

Doc from org.jooq.Formattable.formatInsert.

Get this result as a set of INSERT statements.

This uses the the first record's TableRecord#getTable(), if the first record is a TableRecord. Otherwise, this generates INSERT statements into an "UNKNOWN_TABLE". In both cases, the Result#fields() are used for column names.

Annotations
@Override
formatInsertback to summary
public final void formatInsert(OutputStream stream)

Implements org.jooq.Formattable.formatInsert.

Doc from org.jooq.Formattable.formatInsert.

Like formatInsert(), but the data is output onto an OutputStream.

Annotations
@Override
formatInsertback to summary
public final String formatInsert(Table<?> table, Field<?>... f)

Implements org.jooq.Formattable.formatInsert.

Doc from org.jooq.Formattable.formatInsert.

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Get this result as a set of INSERT statements.

This explicitly specifies the table (and optionally the fields) to insert into. If the fields argument is left empty, the Result#fields() are used, instead.

Annotations
@Override
formatInsertback to summary
public final void formatInsert(OutputStream stream, Table<?> table, Field<?>... f)

Implements org.jooq.Formattable.formatInsert.

Doc from org.jooq.Formattable.formatInsert.

Deprecated

as a consequence of Field being deprecated. See corresponding docs for further information.

Like formatInsert(Table, Field...), but the data is output onto an OutputStream.

Annotations
@Override
formatJSONback to summary
public final String formatJSON()

Implements org.jooq.Formattable.formatJSON.

Doc from org.jooq.Formattable.formatJSON.

Get a simple formatted representation of this result as a JSON array of array.

The format is the following:


{"fields":[{"name":"field-1","type":"type-1"},
           {"name":"field-2","type":"type-2"},
           ...,
           {"name":"field-n","type":"type-n"}],
 "records":[[value-1-1,value-1-2,...,value-1-n],
            [value-2-1,value-2-2,...,value-2-n]]}
Returns:String

The formatted result

Annotations
@Override
formatJSONback to summary
public final String formatJSON(JSONFormat format)

Implements org.jooq.Formattable.formatJSON.

Doc from org.jooq.Formattable.formatJSON.

Get a simple formatted representation of this result as a JSON data structure, according to the format.

Returns:String

The formatted result

Annotations
@Override
formatJSONback to summary
public final void formatJSON(OutputStream stream)

Implements org.jooq.Formattable.formatJSON.

Doc from org.jooq.Formattable.formatJSON.

Like formatJSON(), but the data is output onto an OutputStream.

Annotations
@Override
formatJSONback to summary
public final void formatJSON(OutputStream stream, JSONFormat format)

Implements org.jooq.Formattable.formatJSON.

Doc from org.jooq.Formattable.formatJSON.

Like formatJSON(JSONFormat), but the data is output onto an OutputStream.

Annotations
@Override
formatJSONback to summary
public final void formatJSON(Writer writer)

Implements org.jooq.Formattable.formatJSON.

Doc from org.jooq.Formattable.formatJSON.

Like formatJSON(), but the data is output onto a Writer.

Annotations
@Override
formatXMLback to summary
public final String formatXML()

Implements org.jooq.Formattable.formatXML.

Doc from org.jooq.Formattable.formatXML.

Get this result formatted as XML.

Annotations
@Override
formatXMLback to summary
public final String formatXML(XMLFormat format)

Implements org.jooq.Formattable.formatXML.

Doc from org.jooq.Formattable.formatXML.

Get this result formatted as XML.

Annotations
@Override
formatXMLback to summary
public final void formatXML(OutputStream stream)

Implements org.jooq.Formattable.formatXML.

Doc from org.jooq.Formattable.formatXML.

Like formatXML(), but the data is output onto an OutputStream.

Annotations
@Override
formatXMLback to summary
public final void formatXML(OutputStream stream, XMLFormat format)

Implements org.jooq.Formattable.formatXML.

Doc from org.jooq.Formattable.formatXML.

Like formatXML(XMLFormat), but the data is output onto an OutputStream.

Annotations
@Override
formatXMLback to summary
public final void formatXML(Writer writer)

Implements org.jooq.Formattable.formatXML.

Doc from org.jooq.Formattable.formatXML.

Like formatXML(), but the data is output onto a Writer.

Annotations
@Override
getAttachablesback to summary
pack-priv abstract List<? extends Attachable> getAttachables()
intoXMLback to summary
public final Document intoXML()

Implements org.jooq.Formattable.intoXML.

Doc from org.jooq.Formattable.intoXML.

Get this result as XML.

Annotations
@Override
intoXMLback to summary
public final <H extends ContentHandler> H intoXML(H handler) throws SAXException

Implements org.jooq.Formattable.intoXML.

Doc from org.jooq.Formattable.intoXML.

Get this result as XML using a SAX ContentHandler.

Parameters
handler:H

The custom content handler.

Returns:H

The argument content handler is returned for convenience.

Annotations
@Override