Constructor and Description |
---|
MariaDbQuery(String query)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object otherObj) |
int |
getQuerySize() |
String |
toString() |
void |
validate() |
void |
writeFirstRewritePart(OutputStream os) |
void |
writeLastRewritePart(OutputStream os) |
int |
writeLastRewritePartLength() |
void |
writeTo(OutputStream os)
Write whole query to buffer.
|
void |
writeTo(OutputStream ostream,
int offset,
int packLength)
Write whole query to buffer.
|
void |
writeToRewritablePart(OutputStream os,
int rewriteOffset)
Write rewritable part.
|
int |
writeToRewritablePartLength(int rewriteOffset) |
public MariaDbQuery(String query)
query
- sql querypublic void writeTo(OutputStream os) throws IOException
writeTo
in interface Query
os
- outputStreamIOException
- if any error occur when writing to bufferpublic void writeTo(OutputStream ostream, int offset, int packLength) throws IOException
ostream
- outputStreamoffset
- buffer offsetpackLength
- max lengthIOException
- if any error occur when writing to bufferpublic void writeFirstRewritePart(OutputStream os) throws IOException
writeFirstRewritePart
in interface Query
IOException
public void writeLastRewritePart(OutputStream os) throws IOException
writeLastRewritePart
in interface Query
IOException
public int writeLastRewritePartLength()
writeLastRewritePartLength
in interface Query
public void writeToRewritablePart(OutputStream os, int rewriteOffset) throws IOException
example : "insert into (a,b) into (1,2)" this method will write the ",(1,2)" part.
writeToRewritablePart
in interface Query
os
- outputstreamrewriteOffset
- offsetIOException
- if any error occur when writing to bufferpublic int writeToRewritablePartLength(int rewriteOffset)
writeToRewritablePartLength
in interface Query
public int getQuerySize()
getQuerySize
in interface Query
public void validate() throws QueryException
validate
in interface Query
QueryException
Copyright © 2016. All rights reserved.