Mercurial > hg > monetdb-java
comparison src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java @ 380:bf521f343172
Added support for new Java 8 java.sql.Types: Types.TIME_WITH_TIMEZONE and Types.TIMESTAMP_WITH_TIMEZONE.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Wed, 07 Oct 2020 18:29:02 +0200 (2020-10-07) |
parents | d7661075ebf7 |
children | 3c224b31bd29 |
comparison
equal
deleted
inserted
replaced
379:d7661075ebf7 | 380:bf521f343172 |
---|---|
636 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ | 636 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ |
637 case Types.CLOB: | 637 case Types.CLOB: |
638 case Types.BLOB: | 638 case Types.BLOB: |
639 case Types.DATE: | 639 case Types.DATE: |
640 case Types.TIME: | 640 case Types.TIME: |
641 case Types.TIME_WITH_TIMEZONE: | |
641 case Types.TIMESTAMP: | 642 case Types.TIMESTAMP: |
643 case Types.TIMESTAMP_WITH_TIMEZONE: | |
642 return true; | 644 return true; |
643 } | 645 } |
644 // conversion to all other types is not supported | 646 // conversion to all other types is not supported |
645 return false; | 647 return false; |
646 case Types.DATE: | 648 case Types.DATE: |
649 case Types.VARCHAR: | 651 case Types.VARCHAR: |
650 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ | 652 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ |
651 case Types.CLOB: | 653 case Types.CLOB: |
652 case Types.DATE: | 654 case Types.DATE: |
653 case Types.TIMESTAMP: | 655 case Types.TIMESTAMP: |
656 case Types.TIMESTAMP_WITH_TIMEZONE: | |
654 return true; | 657 return true; |
655 } | 658 } |
656 // conversion to all other types is not supported | 659 // conversion to all other types is not supported |
657 return false; | 660 return false; |
658 case Types.TIME: | 661 case Types.TIME: |
662 case Types.TIME_WITH_TIMEZONE: | |
659 switch (toType) { | 663 switch (toType) { |
660 case Types.CHAR: | 664 case Types.CHAR: |
661 case Types.VARCHAR: | 665 case Types.VARCHAR: |
662 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ | 666 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ |
663 case Types.CLOB: | 667 case Types.CLOB: |
664 case Types.TIME: | 668 case Types.TIME: |
669 case Types.TIME_WITH_TIMEZONE: | |
665 return true; | 670 return true; |
666 } | 671 } |
667 // conversion to all other types is not supported | 672 // conversion to all other types is not supported |
668 return false; | 673 return false; |
669 case Types.TIMESTAMP: | 674 case Types.TIMESTAMP: |
675 case Types.TIMESTAMP_WITH_TIMEZONE: | |
670 switch (toType) { | 676 switch (toType) { |
671 case Types.CHAR: | 677 case Types.CHAR: |
672 case Types.VARCHAR: | 678 case Types.VARCHAR: |
673 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ | 679 /* case Types.LONGVARCHAR: is not supported by MonetDB and will fail */ |
674 case Types.CLOB: | 680 case Types.CLOB: |
675 case Types.DATE: | 681 case Types.DATE: |
676 case Types.TIME: | 682 case Types.TIME: |
683 case Types.TIME_WITH_TIMEZONE: | |
677 case Types.TIMESTAMP: | 684 case Types.TIMESTAMP: |
685 case Types.TIMESTAMP_WITH_TIMEZONE: | |
678 return true; | 686 return true; |
679 } | 687 } |
680 // conversion to all other types is not supported | 688 // conversion to all other types is not supported |
681 return false; | 689 return false; |
682 } | 690 } |