package org.geotools.data.teradata;

import org.geotools.jdbc.JDBCDateTestSetup;
import org.geotools.jdbc.JDBCTestSetup;

public class TeradataDateTestSetup extends JDBCDateTestSetup {


    public TeradataDateTestSetup(JDBCTestSetup delegate) {
        super(delegate);
    }


    protected void createDateTable() throws Exception {
        run("CREATE TABLE dates (d DATE, dt TIMESTAMP, t TIME)");

        //_date('1998/05/31:12:00:00AM', 'yyyy/mm/dd:hh:mi:ssam'));

        run("INSERT INTO DATES VALUES (DATE '1969-12-23' (format 'yyyy-MM-dd'), '2009-06-28 15:12:41' (TIMESTAMP, format 'YYYY-MM-ddBHH:mi:ss'), '15:12:41' (TIMESTAMP, format 'HH:mi:ss')  );");
        run("INSERT INTO DATES VALUES (DATE '2009-01-15' (format 'yyyy-MM-dd'), '2009-01-15 13:10:12' (TIMESTAMP, format 'YYYY-MM-ddBHH:mi:ss'), '13:10:12' (TIMESTAMP, format 'HH:mi:ss')  );");
        run("INSERT INTO DATES VALUES (DATE '2009-09-29' (format 'yyyy-MM-dd'), '2009-09-29 17:54:23' (TIMESTAMP, format 'YYYY-MM-ddBHH:mi:ss'), '17:54:23' (TIMESTAMP, format 'HH:mi:ss')  );");

    }


    protected void dropDateTable() throws Exception {
        runSafe("DROP TABLE DATES");
    }

}
@@ -463,16 +463,24 @@
 sam'));%0A
+        
 %0A       
@@ -511,21 +511,16 @@
 VALUES (
-DATE 
 '1969-12
@@ -525,16 +525,22 @@
 12-23' (
+DATE, 
 format '
@@ -626,37 +626,32 @@
 '15:12:41' (TIME
-STAMP
 , format 'HH:mi:
@@ -646,33 +646,32 @@
 rmat 'HH:mi:ss')
- 
  );%22);%0A        r
@@ -696,29 +696,24 @@
 TES VALUES (
-DATE 
 '2009-01-15'
@@ -714,16 +714,22 @@
 01-15' (
+DATE, 
 format '
@@ -815,37 +815,32 @@
 '13:10:12' (TIME
-STAMP
 , format 'HH:mi:
@@ -839,25 +839,24 @@
  'HH:mi:ss')
- 
  );%22);%0A     
@@ -893,13 +893,8 @@
 ES (
-DATE 
 '200
@@ -903,16 +903,22 @@
 09-29' (
+DATE, 
 format '
@@ -1004,37 +1004,32 @@
 '17:54:23' (TIME
-STAMP
 , format 'HH:mi:
@@ -1032,17 +1032,16 @@
 :mi:ss')
- 
  );%22);%0A%0A

fix date