org.codehaus.modello.generator.database.sql

Class PostgreSqlBuilder


public class PostgreSqlBuilder
extends SqlBuilder

An SQL Builder for PostgresSqlL
Version:
$Revision: 149 $
Author:
John Thorhauer

Constructor Summary

PostgreSqlBuilder()

Method Summary

void
createColumn(Table table, Column column)
Outputs the DDL to add a column to a table.
protected String
getSqlType(Column column)
protected void
printAutoIncrementColumn(Table table, Column column)
Outputs the fact that this column is an auto increment column.

Methods inherited from class org.codehaus.modello.generator.database.sql.SqlBuilder

alterColumn, columnsDiffer, createColumn, createDatabase, createDatabase, createTable, dropColumn, dropDatabase, dropIndex, dropTable, getIndent, getNativeType, getSqlType, getWriter, isForeignKeyConstraintsNamed, isForeignKeysEmbedded, isIndexesEmbedded, isPrimaryKeyEmbedded, print, printAutoIncrementColumn, printComment, printEndOfStatement, printIndent, printNotNullable, printNullable, println, println, setAlterTableForDrop, setForeignKeyConstraintsNamed, setForeignKeysEmbedded, setIndent, setIndexesEmbedded, setPrimaryKeyEmbedded, setWriter, shouldGeneratePrimaryKeys, tableComment, useAlterTableForDrop, writeAlterHeader, writeColumnTypes, writeEmbeddedIndexes, writeForeignKeyAlterTable, writeForeignKeys, writeForeignKeysAlterTable, writeForeignReferences, writeIndex, writeIndexes, writeLocalReferences, writePrimaryKeyStatement, writePrimaryKeys, writePrimaryKeysAlterTable

Constructor Details

PostgreSqlBuilder

public PostgreSqlBuilder()

Method Details

createColumn

public void createColumn(Table table,
                         Column column)
            throws IOException
Outputs the DDL to add a column to a table.
Overrides:
createColumn in interface SqlBuilder

getSqlType

protected String getSqlType(Column column)
Overrides:
getSqlType in interface SqlBuilder
Returns:
the full SQL type string including the size

printAutoIncrementColumn

protected void printAutoIncrementColumn(Table table,
                                        Column column)
            throws IOException
Outputs the fact that this column is an auto increment column.
Overrides:
printAutoIncrementColumn in interface SqlBuilder