Re: Database interaction
- From: Zach Bean <zb forty2 com>
- To: gtk-perl-list gnome org
- Subject: Re: Database interaction
- Date: Fri, 11 Jun 2004 19:57:17 -0400
Quoting Daniel Kasak <dkasak nusconsulting com au>:
I've finished a 'just-barely-limping-along' object to handle DB
interaction with a glade-generated form.
It does querying, record navigation, applying updates and inserting
records.
I was about to start on a similar object for a SimpleList version when
I remembered this post where you said you were doing the same ( but
using a custom TreeModel ). Want to share code ? :) I'll post what I've
got to you / the list if there is interest.
I do have a custom TreeModel that displays a tree structure that's stored
in a SQL database. It uses a table that has at least three fields: id,
sibling, and parent. Sibling is defined as either the item that comes
next at the same level, or 65535 when there is no such item.
I'd be willing to share it if anyone else has interest, but it does
currently have some ... limitations. If you only want to have a list
instead of a tree, it will require modification, unless you want to have
a parent column in your table with only NULL values in it. It's also a
bit slow on expanding the levels of the tree. I think it's mostly due to
the topological sort I'm using to ensure that each level appears in the
correct order.
The biggest problem, though, is that it requires a modified Gtk2 if you
want to do things like set values in the DB because of the way TreeIters
work in Perl. The necessary modifications may make their way into a
release at some point; I'm supposed to be testing out how safe they are
in practice, but I haven't been able to yet because I discovered some
problems in my TreeModel that were preventing me from doing the testing.
I should be able to work on that in the next day or two.
Zach
--
And I say, Give me back my memory, or I'll rip you into three boy scouts
and a watchband!
---Aaron in "Remind Me Again"
------------------------------------------------------------------------
Zach Bean, zb forty2 com, web forty2 com http://www.forty2.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]