org.axonframework.eventstore.jdbc
Class PostgresEventSqlSchema<T>

java.lang.Object
  extended by org.axonframework.eventstore.jdbc.GenericEventSqlSchema<T>
      extended by org.axonframework.eventstore.jdbc.PostgresEventSqlSchema<T>
All Implemented Interfaces:
EventSqlSchema<T>

public class PostgresEventSqlSchema<T>
extends GenericEventSqlSchema<T>

SQL schema supporting postgres databases.

The difference to the GenericEventSqlSchema is the use of postgres' bytea data type for storing the serialized payload and metaData. A human-readable representation of this data can be accessed by using postgres encode(column, 'escape') function.

Since:
2.4
Author:
Jochen Munz

Field Summary
 
Fields inherited from class org.axonframework.eventstore.jdbc.GenericEventSqlSchema
schemaConfiguration
 
Constructor Summary
PostgresEventSqlSchema()
           
PostgresEventSqlSchema(Class<T> dataType)
           
PostgresEventSqlSchema(Class<T> dataType, SchemaConfiguration schemaConfiguration)
           
 
Method Summary
 PreparedStatement sql_createDomainEventEntryTable(Connection connection)
          Creates a PreparedStatement that allows for the creation of the table to store Event entries.
 PreparedStatement sql_createSnapshotEventEntryTable(Connection connection)
          Creates a PreparedStatement that allows for the creation of the table to store Snapshots.
 
Methods inherited from class org.axonframework.eventstore.jdbc.GenericEventSqlSchema
createSerializedDomainEventData, doInsertEventEntry, getDataType, readPayload, readTimeStamp, setForceUtc, sql_dateTime, sql_fetchFromSequenceNumber, sql_findSnapshotSequenceNumbers, sql_getFetchAll, sql_insertDomainEventEntry, sql_insertSnapshotEventEntry, sql_loadLastSnapshot, sql_pruneSnapshots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgresEventSqlSchema

public PostgresEventSqlSchema()

PostgresEventSqlSchema

public PostgresEventSqlSchema(Class<T> dataType)

PostgresEventSqlSchema

public PostgresEventSqlSchema(Class<T> dataType,
                              SchemaConfiguration schemaConfiguration)
Method Detail

sql_createSnapshotEventEntryTable

public PreparedStatement sql_createSnapshotEventEntryTable(Connection connection)
                                                    throws SQLException
Description copied from interface: EventSqlSchema
Creates a PreparedStatement that allows for the creation of the table to store Snapshots.

Specified by:
sql_createSnapshotEventEntryTable in interface EventSqlSchema<T>
Overrides:
sql_createSnapshotEventEntryTable in class GenericEventSqlSchema<T>
Parameters:
connection - The connection to create the PreparedStatement for
Returns:
The Prepared Statement, ready to be executed
Throws:
SQLException - when an exception occurs while creating the prepared statement

sql_createDomainEventEntryTable

public PreparedStatement sql_createDomainEventEntryTable(Connection connection)
                                                  throws SQLException
Description copied from interface: EventSqlSchema
Creates a PreparedStatement that allows for the creation of the table to store Event entries.

Specified by:
sql_createDomainEventEntryTable in interface EventSqlSchema<T>
Overrides:
sql_createDomainEventEntryTable in class GenericEventSqlSchema<T>
Parameters:
connection - The connection to create the PreparedStatement for
Returns:
The Prepared Statement, ready to be executed
Throws:
SQLException - when an exception occurs while creating the prepared statement


Copyright © 2010-2016. All Rights Reserved.