Re: Python Patch for inserting a view into a view
Jean-Claude Wippler <[email protected]>
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
Brian Kelley wrote:
> At long last, attached is the diff and the new PyView.cpp file that
> allows the python interface to insert a view into another view.
>
> usage:
> view.insert(index, view2)
> is now supported. Properties that don't exist in view but exist in
> view2 will be added to view.
>
> example:
>
> import metakit
>
> st = metakit.storage()
> v = st.getas("test[a:i,b:S,c:S]")
> v2 = st.getas("test2[d:i]")
>
> for i in range(100):
> v.append((i, str(i), str(i)))
>
> v2.append((1,))
> v2.insert(0, v)
> metakit.dump(v2)
> del st
Thank you, I've applied the patch. It's in CVS for now. I'm
considering wrapping up a new minor release & distribution again, to
wrap up the last few tweaks.
-jcw
_____________________________________________
Metakit mailing list - [email protected]
http://www.equi4.com/mailman/listinfo/metakit