Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: GOODS Updating a Collection inside of a Dictionary node.: msg#00118

lang.smalltalk.squeak.seaside

Subject: Re: GOODS Updating a Collection inside of a Dictionary node.

Hi Larry,

> I've got GOODS installed and am tinkering with it. I have a usage
> question. I've created a root as a Dictionary. With values as Ordered
> Collections. Each Ordered Collection corresponds to a table in an
> RDBMS, that I'm converting to Squeak.
> Each item in the Collection is an array representing a tuple or row from
> the table. My question is: how would I update an array item in the
> Ordered Collection. Is there a better way, than
> 1) retrieving the entire collection: db root at: 'foo'
> 2) changing on of the items. someCollection at: x put: y
> 3) writing the collection back to the dictionary. db root at: 'foo'
> put: someCollection

This is how I would do it, but step (3) shouldn't be necessary. You can say

someCollection := db root at: 'foo'.
someCollection at: x put: y.

db commit.

and the commit should pick up the new contents of the collection.

Also, the GOODS client uses proxies that only load objects when needed, so
step (1) should not be too expensive: it would probably load the
collection's list of the objects that were in it, but not all of the objects
themselves.

Hope this helps,
Ben Schroeder


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation