public class Insert extends PostgresSqlPart
Generates an INSERT INTO
statement for PostgreSQL.
INSERT INTO "tableName" ("col1", "col2", "col3")
VALUES (val1, val2, val3),
(val1, val2, val3),
(val1, val2, val3),...
Modifier and Type | Method and Description |
---|---|
Insert |
add(String columnName,
Object value) |
void |
collectSqlFragment(CodeWriter writer) |
InsertRow |
getLastRow() |
List<InsertRow> |
getRows() |
String |
getTable() |
Insert |
nextRow() |
Insert |
setPretty(boolean pretty)
Indicates if line breaks and indentations should be added to output insert statement (default false).
Example output (pretty = true): INSERT INTO "tableName" ("col1", "col2", "col3") |
escapeKeyword
collectParameterValues, getParameterValues, getSqlFragment, isPretty, printSqlParts, toString
public Insert(String table)
public Insert setPretty(boolean pretty)
INSERT INTO "tableName" ("col1", "col2", "col3")
VALUES (val1, val2, val3),
(val1, val2, val3),
(val1, val2, val3),...
INSERT INTO "tableName" ("col1", "col2", "col3") VALUES (val1, val2, val3), (val1, val2, val3), (val1, val2, val3),...
public String getTable()
public Insert nextRow()
public InsertRow getLastRow()
public void collectSqlFragment(CodeWriter writer)
collectSqlFragment
in class SqlPart
Copyright (c) 2006-2024 North Concepts Inc. All Rights Reserved.