ca.krasnay.sqlbuilder
Class InsertBuilder
java.lang.Object
ca.krasnay.sqlbuilder.AbstractSqlBuilder
ca.krasnay.sqlbuilder.InsertBuilder
- All Implemented Interfaces:
- Serializable
public class InsertBuilder
- extends AbstractSqlBuilder
- implements Serializable
Builder for building SQL insert statements.
- Author:
- John Krasnay
- See Also:
- Serialized Form
InsertBuilder
public InsertBuilder(String table)
- Constructor.
- Parameters:
table - Name of the table into which we'll be inserting.
set
public InsertBuilder set(String column,
String value)
- Inserts a column name, value pair into the SQL.
- Parameters:
column - Name of the table column.value - Value to substitute in. InsertBuilder does *no* interpretation
of this. If you want a string constant inserted, you must
provide the single quotes and escape the internal quotes. It
is more common to use a question mark or a token in the style
of ParameterizedPreparedStatementCreator, e.g. ":foo".
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014. All rights reserved.