Support creating arrays of java.sql.Date.
This commit is contained in:
@@ -22,6 +22,7 @@ package com.samskivert.depot.impl;
|
|||||||
|
|
||||||
import java.sql.Array;
|
import java.sql.Array;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
|
import java.sql.Date;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
@@ -75,6 +76,8 @@ public class PostgreSQL4Builder extends PostgreSQLBuilder
|
|||||||
type = "smallint"; // tinyint is in the spec, but PG doesn't recognize?
|
type = "smallint"; // tinyint is in the spec, but PG doesn't recognize?
|
||||||
} else if (testValue instanceof Timestamp) {
|
} else if (testValue instanceof Timestamp) {
|
||||||
type = "timestamp";
|
type = "timestamp";
|
||||||
|
} else if (testValue instanceof Date) {
|
||||||
|
type = "date";
|
||||||
} else {
|
} else {
|
||||||
throw new DatabaseException(
|
throw new DatabaseException(
|
||||||
"Don't know how to make Postgres array for " + testValue.getClass());
|
"Don't know how to make Postgres array for " + testValue.getClass());
|
||||||
|
|||||||
Reference in New Issue
Block a user