Re: ByteArray trimming - why?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Mar 04 2003 - 21:40:31 EST

  • Next message: Andrus Adamchik: "Re: Where to start ?"

    Trying to address all the issues discussed in this thread at once.

    1. Trimming vs. VAR[CHAR|BINARY].

    Yes, I agree with Holger and Dirk - using CHAR when you really need
    VARCHAR is probably a bad design. But we must face it - there are
    existing databases out there, and most people have no choice but to make
    their apps work in this environment.

    So what is the suggested solution? Make it up to the users of course.
    This may work like that - if your ObjAttribute is a String, we trim, if
    it is char[]/CharacterArray - we don't. Same with binary types. This is
    very easy to implement with ExtendedTypes, since they are keyed off of
    the Java class.

    2. Trimming BINARY.

    I implemented it by analogy with CharType. I totally see how people
    would store a byte[10] array in a BINARY(20) column. But then, this part
    is really untested. All we need to do is add a few test cases and see if
    the padding with zero byte really occurs.

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Mar 04 2003 - 21:42:07 EST