MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
testsuite.clusterj.VarbinaryTypesTest Class Reference
Inheritance diagram for testsuite.clusterj.VarbinaryTypesTest:
Collaboration diagram for testsuite.clusterj.VarbinaryTypesTest:

Public Member Functions

void testWriteJDBCReadNDB ()
void testWriteNDBReadJDBC ()
- Public Member Functions inherited from testsuite.clusterj.AbstractClusterJModelTest
void localSetUp ()
- Public Member Functions inherited from testsuite.clusterj.AbstractClusterJTest
void createSession ()

Protected Member Functions

boolean getDebug ()
int getNumberOfInstances ()
String getTableName ()
Object getColumnValue (int i, int j)
void verify (String where, List< Object[]> expecteds, List< Object[]> actuals)
ColumnDescriptor[] getColumnDescriptors ()
- Protected Member Functions inherited from testsuite.clusterj.AbstractClusterJModelTest
boolean getCleanupAfterTest ()
void setAutoCommit (Connection connection, boolean b)
void createEmployeeInstances (int count)
void consistencyCheck (Employee emp)
void createDn2idInstances (int number)
void consistencyCheck (Dn2id dn2id)
List< Object[]> getExpected ()
void writeJDBCreadNDB ()
void writeJDBCreadJDBC ()
void writeNDBreadNDB ()
void writeNDBreadJDBC ()
void queryAndVerifyResults (String where, ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters, int...objectIds)
List< Object[]> queryJDBC (ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters)
void verifyQueryResults (String where, List< Object[]> results, int...objectIds)
void generateInstances (ColumnDescriptor[] columnDescriptors)
IdBase getNewInstance (Class<?extends IdBase > modelClass)
void writeToJDBC (ColumnDescriptor[] columnDescriptors, List< IdBase > instances)
void writeToNDB (ColumnDescriptor[] columnDescriptors, List< IdBase > instances)
List< Object[]> readFromNDB (ColumnDescriptor[] columnDescriptors)
List< Object[]> readFromJDBC (ColumnDescriptor[] columnDescriptors)
String getA1for (int number, int index)
String getA3for (long i)
void createAllPrimitivesInstances (int number)
void createAllPrimitivesInstances (Session session, int number)
AllPrimitives createAllPrimitiveInstance (Session session, int i)
void initialize (AllPrimitives instance, int i)
- Protected Member Functions inherited from testsuite.clusterj.AbstractClusterJTest
void addTearDownClasses (Class<?>...classes)
void createSessionFactory ()
Properties modifyProperties ()
void dumpSystemProperties ()
void error (String message)
void error (String context, Exception ex)
void errorIfNotEqual (String message, Object expected, Object actual)
void errorIfNotEqual (String message, int[] expected, int[] actual)
void errorIfEqual (String message, Object expected, Object actual)
void failOnError ()
void closeConnection ()
void getConnection (Properties extraProperties)
Connection getConnection ()
void getConnection (String propertiesFileName)
void loadDriver ()
void initializeErrorMessages ()
void initializeJDBC ()
void initializeSchema ()
void loadProperties ()
void loadProperties (String propsFileName)
void loadSchema ()
void loadSchemaDefinition ()
void localTearDown ()
final void setUp () throws Exception
final void tearDown () throws Exception
void removeAll (Class<?> cls)
boolean testSchema ()
boolean resetSchema ()
String dump (List< String > list)

Static Protected Attributes

static ColumnDescriptor[] columnDescriptors
- Static Protected Attributes inherited from testsuite.clusterj.AbstractClusterJModelTest
static TimeZone localSystemTimeZone = TimeZone.getDefault()
static final long ONE_SECOND = 1000L
static final long ONE_MINUTE = 1000L * 60L
static final long ONE_HOUR = 1000L * 60L * 60L
static final long TEN_HOURS = 1000L * 60L * 60L * 10L
static final long ONE_DAY = 1000L * 60L * 60L * 24L
static Object[] dn2idPK = setupDn2idPK()
- Static Protected Attributes inherited from testsuite.clusterj.AbstractClusterJTest
static final String JDBC_DRIVER_NAME = "jdbc.driverName"
static final String JDBC_URL = "jdbc.url"
static Connection connection
static String jdbcDriverName
static String jdbcPassword
static String jdbcURL
static String jdbcUsername
static Properties props
static List< StringschemaDefinition = new ArrayList<String>()
static boolean schemaInitialized = false

Additional Inherited Members

- Static Protected Member Functions inherited from testsuite.clusterj.AbstractClusterJModelTest
static long getMillisFor (int year, int month, int day, int hour, int minute, int second)
static long getMillisFor (int year, int month, int day)
static long getMillisFor (int days, int hour, int minute, int second)
static void resetLocalSystemDefaultTimeZone (Connection connection)
static Object[] setupDn2idPK ()
- Protected Attributes inherited from testsuite.clusterj.AbstractClusterJModelTest
List< Employeeemployees
List< Dn2iddn2ids
List< IdBaseinstances = new ArrayList<IdBase>()
ClassLoader loader

Detailed Description

Test that Timestamps can be read and written. 

case 1: Write using JDBC, read using NDB. case 2: Write using NDB, read using JDBC. Schema

drop table if exists varbinarytypes; create table varbinarytypes ( id int not null primary key,

binary1 varbinary(1), binary2 varbinary(2), binary4 varbinary(4), binary8 varbinary(8), binary16 varbinary(16), binary32 varbinary(32), binary64 varbinary(64), binary128 varbinary(128), binary256 varbinary(256), binary512 varbinary(512), binary1024 varbinary(1024), binary2048 varbinary(2048)

) ENGINE=ndbcluster DEFAULT CHARSET=latin1;

Definition at line 53 of file VarbinaryTypesTest.java.

Member Function Documentation

ColumnDescriptor [] testsuite.clusterj.VarbinaryTypesTest.getColumnDescriptors ( )
inlineprotected

Subclasses must override this method to provide the column descriptors for the test

Reimplemented from testsuite.clusterj.AbstractClusterJModelTest.

Definition at line 350 of file VarbinaryTypesTest.java.

Object testsuite.clusterj.VarbinaryTypesTest.getColumnValue ( int  i,
int  j 
)
inlineprotected

Subclasses override this method to provide values for rows (i) and columns (j)

Reimplemented from testsuite.clusterj.AbstractClusterJModelTest.

Definition at line 80 of file VarbinaryTypesTest.java.

boolean testsuite.clusterj.VarbinaryTypesTest.getDebug ( )
inlineprotected

Subclasses can override this method to get debugging info printed to System.out

Reimplemented from testsuite.clusterj.AbstractClusterJTest.

Definition at line 58 of file VarbinaryTypesTest.java.

int testsuite.clusterj.VarbinaryTypesTest.getNumberOfInstances ( )
inlineprotected

Subclasses must override this method to provide the number of instances to create

Reimplemented from testsuite.clusterj.AbstractClusterJModelTest.

Definition at line 63 of file VarbinaryTypesTest.java.

String testsuite.clusterj.VarbinaryTypesTest.getTableName ( )
inlineprotected

Subclasses must override this method to provide the name of the table for the test

Reimplemented from testsuite.clusterj.AbstractClusterJModelTest.

Definition at line 68 of file VarbinaryTypesTest.java.

void testsuite.clusterj.VarbinaryTypesTest.verify ( String  where,
List< Object[]>  expecteds,
List< Object[]>  actuals 
)
inlineprotected

Verify that the actual results match the expected results. If not, use the multiple error reporting method errorIfNotEqual defined in the superclass.

Parameters
wherethe location of the verification of results, normally the name of the test method
expectedsthe expected results
actualsthe actual results

Reimplemented from testsuite.clusterj.AbstractClusterJModelTest.

Definition at line 98 of file VarbinaryTypesTest.java.

Member Data Documentation

ColumnDescriptor [] testsuite.clusterj.VarbinaryTypesTest.columnDescriptors
staticprotected
Initial value:
new ColumnDescriptor[] {
binary1,
binary2,
binary4,
binary8,
binary16,
binary32,
binary64,
binary128,
binary256,
binary512,
binary1024,
binary2048
}

Definition at line 334 of file VarbinaryTypesTest.java.


The documentation for this class was generated from the following file: