class PostgresSchema {

    public static void create(final QueryStatement statement, final CollectionName collection, final IObject options)
            throws QueryBuildException {
        try {
            Writer body = statement.getBodyWriter();
            CreateClauses.writeFunctions(body);
            body.write("CREATE TABLE ");
            body.write(collection.toString());
            body.write(" (");
            body.write(DOCUMENT_COLUMN);
            body.write(" jsonb NOT NULL");
            CreateClauses.writeFullTextColumn(body, options);
            body.write(");\n");
            CreateClauses.writePrimaryKey(body, collection);
            if (options != null) {
                IndexCreators.writeIndexes(body, collection, options);
            }
        } catch (Exception e) {
            throw new QueryBuildException("Failed to build create body", e);
        }
    }

    private  PostgresSchema();

}