Re: Brahms DB access

From: Flemming Videbaek (videbaek@sgs1.hirg.bnl.gov)
Date: Sat Nov 10 2001 - 09:31:20 EST

  • Next message: Flemming Videbaek: "problem in brat code on solaris / rmine001"

    > db/calib/BrDbRevision.cxx), and it seems to that what you did, was to
    > expand the Revision table to have another column, and then when you
    > get the revision from the DB, or inserts the revision to the DB, you
    > encode the into a string, specific for the data type.  Ok, that looks
    > fine to me (you know my reservations on this in the first place, so no
    > need to recap).
    
    Yes I understand the issue on having datatype both in table and revision.
    The second part  thoughis that the bytes are swapped according to net2host()
    ie.
    the data part actually has all bytes swapped, so your solution below I do
    not think would work quite as easy, though it my be we can write a
    program/script with sql
    that gets the data-blop out and swaps' accordingly.
    
    >
    > I just realised that we may not need to repopulate the revision table
    > at all.  I think we can do with a
    >
    >   ALTER TABLE Revision ADD COLUMN datatype INT NOT NULL AFTER comment;
    >
    > [1] and then multiple
    >
    >   UPDATE TABLE Revision SET datatype=<type> WHERE parameterId=<parameter>;
    >
    
    It would indeed by nice if we don't have to re-populate the tables.
    



    This archive was generated by hypermail 2b30 : Sat Nov 10 2001 - 09:27:20 EST