Re: OpenBase adapter & types.xml

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Dec 05 2003 - 13:00:50 EST

  • Next message: Mike Kienenberger: "Dev tarball doesn't include test stuff / best practice for specifying jdbc.jar files for tests?"

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    > This is my mistake, please remap it back to boolean. If you see any other
    > things in my version that don't make sense, feel free to change/remove
    > them. For instance I don't think we need to support types like "DATALINK",
    > "REF", etc.

    Sigh. It seems to be my week for stupid questions and dumb errors.

    I took a look at my code, both what I'm using and what I submitted to you.
    Somehow, I overwrote my tailored-to-openbase types.xml with the default
    version.

    No wonder you had to go through and redo it. Sorry about that. On the
    other hand, you figured out a few more than I did.

    My suggestions:

    VARCHAR -> char
    DOUBLE -> double
    BOOLEAN -> boolean
    BIT -> boolean

    REAL -> double ?
    INTEGER -> long and int? just long? I use long for all of my primary and
    foreign keys.

    Here's the "typeInfo" part of an EOModel that I used to derive these ideas:

                typeInfo = {
                    binary = {
                        createParams = 1;
                        defaultJDBCType = (BINARY);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 2048;
                    };
                    boolean = {
                        createParams = 0;
                        defaultJDBCType = (BIT);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 0;
                    };
                    char = {
                        createParams = 1;
                        defaultJDBCType = (CHAR, VARCHAR);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 4096;
                    };
                    date = {
                        createParams = 0;
                        defaultJDBCType = (DATE);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 0;
                    };
                    datetime = {
                        createParams = 0;
                        defaultJDBCType = (TIMESTAMP);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 8;
                        minScale = 0;
                        precision = 20;
                    };
                    double = {
                        createParams = 0;
                        defaultJDBCType = (DOUBLE);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 8;
                        minScale = 0;
                        precision = 20;
                    };
                    float = {
                        createParams = 0;
                        defaultJDBCType = (DOUBLE);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 8;
                        minScale = 0;
                        precision = 20;
                    };
                    int = {
                        createParams = 0;
                        defaultJDBCType = (INTEGER);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 10;
                    };
                    long = {
                        createParams = 0;
                        defaultJDBCType = (INTEGER);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 10;
                    };
                    longlong = {
                        createParams = 0;
                        defaultJDBCType = (BIGINT);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 20;
                    };
                    money = {
                        createParams = 2;
                        defaultJDBCType = (DECIMAL);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 2;
                        minScale = 0;
                        precision = 20;
                    };
                    object = {
                        createParams = 0;
                        defaultJDBCType = (BLOB);
                        isNullable = T;
                        isSearchable = F;
                        maxScale = 0;
                        minScale = 0;
                        precision = 0;
                    };
                    time = {
                        createParams = 0;
                        defaultJDBCType = (TIME);
                        isNullable = T;
                        isSearchable = T;
                        maxScale = 0;
                        minScale = 0;
                        precision = 0;
                    };



    This archive was generated by hypermail 2.0.0 : Fri Dec 05 2003 - 13:00:48 EST