----- "Paul McNett" <[email protected]> wrote: > Adrian Klaver wrote: > > Thanks for the clarification. Any chance > addFieldsFromDataStructure() will make it into the general code? If > not I will code something up here. > > I guess we could provide a basic implementation for you to call from > your bizobj > code. Here's my version that has extra stuff because I like my SQL to > be formatted > with the "proper" amount of space indentation on each line: > > 34 def addFieldsFromDataStructure(self): > 35 max_fill = 0 > 36 for field in self.DataStructure: > 37 if field[3] is not None: > 38 fill = len("%s.%s" % (field[3], field[4])) > 39 max_fill = max(max_fill, fill) > 40 for field in self.DataStructure: > 41 fill = " " * (max_fill - len("%s.%s" % (field[3], > field[4]))) > 42 if field[3] is not None: > 43 self.addField("%s.%s %sas %s" % (field[3], field[4], > fill, field[0]))
Great. Thanks > > sqlite3 does not understand timestamps with time zones. > > sqlite only really knows about INT and CHAR. pysqlite knows about some > but not all > extra types like dates, times, etc. Actually it is more complicated then that. In the default mode it accepts everything as a string and uses dynamic typing(http://sqlite.org/datatype3.html) to adapt to columns where all the data is of one type. In strict mode it does pay attention to types. Sqlite does have date/datetime knowledge it is just hidden(http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions). > > Paul Thanks, Adrian Klaver [email protected] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/1901255812.7285181236791175214.javamail.r...@sz0030a.emeryville.ca.mail.comcast.net
