On Wednesday, February 23, 2011 3:30:43 am Jacek Kałucki wrote:
> Użytkownik Rasmus Schøler Sørensen napisał:
> > Hi Jacek,
> >
> > You might want to update the PyCon 2010 tutorial which uses a list,
> > not tuple, for bizobj DataStructure in the "Creating Many-to-many
> > relationship" section,
> > https://docs.google.com/View?id=dg79jzmg_85f737ww6x&pli=1#Creating_the_Ma
> > ny_Many_Relatio .
> >
> > Also, regarding commit 6457: Very good that you've added an explicit
> > exception, but maybe you want to also add a small note saying that
> > "this exception is raised due to a recent change in the Dabo framework
> > API." Or, alternatively, add a post on the user-list -- I believe it
> > is important to be aware about informing the uses about API changes,
> > everything else is disrespecting the users. (I know that dabo is still
> > only "0.9.8", but on the other hand Ed and Paul have stated that the
> > framework it self is "stable".)
> >
> > That said, thank you for your wonderful work on the framework, Jacek -
> > We really do appreciate it. Also, don't think I'm against changing the
> > API (that's bound to happen when making improvements) - i'm just
> > saying it would be nice with a little heads up :-)
>
> Hi.
>
> I want to apologize for my latest changes and all inconveniences you
> experienced.
> But I feel guilty only in half, since the API really doesn't changed.
> I only introduced strict conformance to it.
> Although it doesn't resolve all potential problems, I added list to
> tuple type
> conversion for DataStructure property in latest commit.
> AFAIK, Werner is doing great job documenting Dabo API with Sphinx.
> I hope, it let to understand framework code better.
Actually that already existed:) If you do bizobj.getDataStructure it creates a
tuple of tuples. Which is actually contrary to what the docs say not only for
type but also structure:
getDataStructure(self)
Gets the structure of the DataSource table. Returns a list
of 3-tuples, where the 3-tuple's elements are:
| 0: the field name (string)
| 1: the field type ('I', 'N', 'C', 'M', 'B', 'D', 'T')
| 2: boolean specifying whether this is a pk field.
bz=self.getBizobj()
bz.DataStructure
[('si_stock_sym', 'C', True, 'public.stock_info', 'si_stock_sym'),
('si_stock_name', 'C', False, 'public.stock_info', 'si_stock_name'),
('si_stock_exch', 'C', False, 'public.stock_info', 'si_stock_exch'),
('si_ts_insert', 'T', False, 'public.stock_info', 'si_ts_insert')]
bz.getDataStructure()
(('si_stock_sym', 'C', True, 'public.stock_info', 'si_stock_sym', None),
('si_stock_name', 'C', False, 'public.stock_info', 'si_stock_name', None),
('si_stock_exch', 'C', False, 'public.stock_info', 'si_stock_exch', None),
('si_ts_insert', 'T', False, 'public.stock_info', 'si_ts_insert', None))
At this point it might be prudent to actually come to a conclusion as to what a
DataStructure is and how it is defined in the various bits of code, before
putting restrictions on it.
--
Adrian Klaver
[email protected]
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
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/[email protected]