org.mariadb.jdbc.internal.common.query

## Class MySQLParameterizedQuery

- java.lang.Object
- - org.mariadb.jdbc.internal.common.query.MySQLParameterizedQuery

All Implemented Interfaces:
  ParameterizedQuery, Query

    public class MySQLParameterizedQuery
    extends Object
    implements ParameterizedQuery

### Constructor Summary

Constructors
Constructor and Description
`MySQLParameterizedQuery(String query, boolean noBackslashEscapes, int rewriteOffset)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clearParameters()` clears the parameters.
`MySQLParameterizedQuery` `cloneQuery()`
`int` `getParamCount()` get the number of parameters in this query.
`ParameterHolder[]` `getParameters()`
`String` `getQuery()`
`byte[][]` `getQueryPartsArray()`
`QueryType` `getQueryType()`
`void` `setParameter(int position, ParameterHolder parameter)` Sets a parameter at a position.
`String` `toString()`
`void` `validate()`
`void` `writeFirstRewritePart(OutputStream os)`
`void` `writeLastRewritePart(OutputStream os)`
`void` `writeTo(OutputStream os)`
`void` `writeToRewritablePart(OutputStream os, int rewriteOffset)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MySQLParameterizedQuery

    public MySQLParameterizedQuery(String query,
                                   boolean noBackslashEscapes,
                                   int rewriteOffset)

### Method Detail

#### cloneQuery

    public MySQLParameterizedQuery cloneQuery()

#### setParameter

    public void setParameter(int position,
                             ParameterHolder parameter)
                      throws IllegalParameterException

Description copied from interface: `ParameterizedQuery`
Sets a parameter at a position. The positions start at 0.

Specified by:
  `setParameter` in interface `ParameterizedQuery`
Parameters:
  `position` - the position to set it at
  `parameter` - the parameter to set
Throws:
  `IllegalParameterException` - if, for example, the position is out of bounds

#### getParameters

    public ParameterHolder[] getParameters()

Specified by:
  `getParameters` in interface `ParameterizedQuery`

#### clearParameters

    public void clearParameters()

Description copied from interface: `ParameterizedQuery`
clears the parameters.

Specified by:
  `clearParameters` in interface `ParameterizedQuery`

#### validate

    public void validate()
                  throws QueryException

Specified by:
  `validate` in interface `Query`
Throws:
  `QueryException`

#### writeTo

    public void writeTo(OutputStream os)
                 throws IOException,
                        QueryException

Specified by:
  `writeTo` in interface `Query`
Throws:
  `IOException`
  `QueryException`

#### writeFirstRewritePart

    public void writeFirstRewritePart(OutputStream os)
                               throws IOException,
                                      QueryException

Specified by:
  `writeFirstRewritePart` in interface `Query`
Throws:
  `IOException`
  `QueryException`

#### writeLastRewritePart

    public void writeLastRewritePart(OutputStream os)
                              throws IOException,
                                     QueryException

Specified by:
  `writeLastRewritePart` in interface `Query`
Throws:
  `IOException`
  `QueryException`

#### writeToRewritablePart

    public void writeToRewritablePart(OutputStream os,
                                      int rewriteOffset)
                               throws IOException,
                                      QueryException

Specified by:
  `writeToRewritablePart` in interface `Query`
Throws:
  `IOException`
  `QueryException`

#### getQuery

    public String getQuery()

Specified by:
  `getQuery` in interface `ParameterizedQuery`
Specified by:
  `getQuery` in interface `Query`

#### getQueryPartsArray

    public byte[][] getQueryPartsArray()

Specified by:
  `getQueryPartsArray` in interface `ParameterizedQuery`

#### getQueryType

    public QueryType getQueryType()

Specified by:
  `getQueryType` in interface `Query`

#### getParamCount

    public int getParamCount()

Description copied from interface: `ParameterizedQuery`
get the number of parameters in this query.

Specified by:
  `getParamCount` in interface `ParameterizedQuery`
Returns:
  number of parameters

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`