Package org.apache.druid.sql.http
Class ObjectLinesWriter
java.lang.Object
org.apache.druid.sql.http.ObjectLinesWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,ResultFormat.Writer
-
Constructor Summary
ConstructorsConstructorDescriptionObjectLinesWriter(OutputStream outputStream, com.fasterxml.jackson.databind.ObjectMapper jsonMapper) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidwriteHeader(org.apache.calcite.rel.type.RelDataType rowType, boolean includeTypes, boolean includeSqlTypes) voidwriteHeaderFromRowSignature(RowSignature rowSignature, boolean includeTypes) voidEnd of the response.voidStart of the response, called once per writer.voidEnd of each result row.voidwriteRowField(String name, Object value) Field within a row.voidStart of each result row.
-
Constructor Details
-
ObjectLinesWriter
public ObjectLinesWriter(OutputStream outputStream, com.fasterxml.jackson.databind.ObjectMapper jsonMapper) throws IOException - Throws:
IOException
-
-
Method Details
-
writeResponseStart
public void writeResponseStart()Description copied from interface:ResultFormat.WriterStart of the response, called once per writer.- Specified by:
writeResponseStartin interfaceResultFormat.Writer
-
writeResponseEnd
Description copied from interface:ResultFormat.WriterEnd of the response. Must allow the user to know that they have read all data successfully.- Specified by:
writeResponseEndin interfaceResultFormat.Writer- Throws:
IOException
-
writeHeader
public void writeHeader(org.apache.calcite.rel.type.RelDataType rowType, boolean includeTypes, boolean includeSqlTypes) throws IOException - Specified by:
writeHeaderin interfaceResultFormat.Writer- Throws:
IOException
-
writeHeaderFromRowSignature
public void writeHeaderFromRowSignature(RowSignature rowSignature, boolean includeTypes) throws IOException - Specified by:
writeHeaderFromRowSignaturein interfaceResultFormat.Writer- Throws:
IOException
-
writeRowStart
Description copied from interface:ResultFormat.WriterStart of each result row.- Specified by:
writeRowStartin interfaceResultFormat.Writer- Throws:
IOException
-
writeRowField
Description copied from interface:ResultFormat.WriterField within a row.- Specified by:
writeRowFieldin interfaceResultFormat.Writer- Throws:
IOException
-
writeRowEnd
Description copied from interface:ResultFormat.WriterEnd of each result row.- Specified by:
writeRowEndin interfaceResultFormat.Writer- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-