GeoTools
  1. GeoTools
  2. GEOT-2240

add tests for boolean type mapping

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.5.7, 2.6-M2
    • Component/s: jdbc
    • Labels:
      None

      Description

      Added a test class (JDBCBooleanTest) for the mapping of boolean types. Some databases like oracle don't support boolean types so i guess this test won't be implemented for oracle. I am not sure for db2 but i think it is the same as oracle. However h2, mysql, postgis, and sqlserver support boolean to some extent.

        Activity

        Hide
        Justin Deoliveira added a comment -
        Andrea + Christian, I committed test for h2, mysql, and postgis, not sure if you care about oracle or db2.
        Show
        Justin Deoliveira added a comment - Andrea + Christian, I committed test for h2, mysql, and postgis, not sure if you care about oracle or db2.
        Hide
        Andrea Aime added a comment -
        Eh, as you noticed before, Oracle does not have a boolean type. So we either introduce a convention, or we need a way for the user to pinpoint which attributes are booleans. Which sounds very much like type mapping, something that eventually Rob & co should provide support for with the community/application schema work.
        Soo... I would not worry about Oracle booleans right now, if someone with a urge and funding needs them we'll look into it again. How does this sound?
        Show
        Andrea Aime added a comment - Eh, as you noticed before, Oracle does not have a boolean type. So we either introduce a convention, or we need a way for the user to pinpoint which attributes are booleans. Which sounds very much like type mapping, something that eventually Rob & co should provide support for with the community/application schema work. Soo... I would not worry about Oracle booleans right now, if someone with a urge and funding needs them we'll look into it again. How does this sound?
        Hide
        Andrea Aime added a comment -
        Oh one thing, I did not see SqlServer in your list of databases... wondering why?
        Show
        Andrea Aime added a comment - Oh one thing, I did not see SqlServer in your list of databases... wondering why?
        Hide
        Justin Deoliveira added a comment -
        Yeah, i am fine with not supporting it in oracle or db2... the only reason this popped up was in cite. So any cite compliant db will need to do booleans. AS for Sql server at first glance i so no boolean but it seems the BIT type gets mapped to boolean, so I will add the tests there as well.
        Show
        Justin Deoliveira added a comment - Yeah, i am fine with not supporting it in oracle or db2... the only reason this popped up was in cite. So any cite compliant db will need to do booleans. AS for Sql server at first glance i so no boolean but it seems the BIT type gets mapped to boolean, so I will add the tests there as well.
        Hide
        Andrea Aime added a comment -
        Oh I see... yeah, nasty one then.
        Oracle has other issues thought, the database forcing capital case means we'll never be able to run CITE on Oracle before we provide a full schema renaming support anyways (spatial forces the table name _and_ the geometry column name to be uppercase).
        The other nasty aspect of this issue, Oracle wise, is that the customary way to represent the boolean type is with a char(1) forced to assume only Y/N values: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6263249199595
        Not sure wheter we have any chance to spot that the column is meant to be a boolean with a setup like that :( (the mapping layer would not only need to change the names, but also map the types, before we can run cite on Oracle... bah!)
        Show
        Andrea Aime added a comment - Oh I see... yeah, nasty one then. Oracle has other issues thought, the database forcing capital case means we'll never be able to run CITE on Oracle before we provide a full schema renaming support anyways (spatial forces the table name _and_ the geometry column name to be uppercase). The other nasty aspect of this issue, Oracle wise, is that the customary way to represent the boolean type is with a char(1) forced to assume only Y/N values: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6263249199595 Not sure wheter we have any chance to spot that the column is meant to be a boolean with a setup like that :( (the mapping layer would not only need to change the names, but also map the types, before we can run cite on Oracle... bah!)
        Hide
        Christian Mueller added a comment -
        Oracle behaves like DB2. I will synchronize with further Oracle development.
        Show
        Christian Mueller added a comment - Oracle behaves like DB2. I will synchronize with further Oracle development.
        Hide
        Justin Deoliveira added a comment -
        I don't think there is much further to do on this one... tests have been implemetned for those databases that have a "boolean like" type. Feel free to open additional issues specific to DB2 and Oracle.
        Show
        Justin Deoliveira added a comment - I don't think there is much further to do on this one... tests have been implemetned for those databases that have a "boolean like" type. Feel free to open additional issues specific to DB2 and Oracle.
        Hide
        Andrea Aime added a comment -
        Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update
        Show
        Andrea Aime added a comment - Mass closing all issues that have been in "resolved" state for 2 months or more without any feedback or update

          People

          • Assignee:
            Justin Deoliveira
            Reporter:
            Justin Deoliveira
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: