Re: Fwd: sql__quasiParser [patch]

Thomas Leonard <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
Hi John,

I suspect this isn't useful. An sql quasi-parser is a powerful object
which typically gives complete access to the application's database,
so you'll almost certainly want to wrap it in some kind of
easily-audited DAO that gives access to only a subset of the rows and
tables (as I mentioned in the blog post). e.g.

        def makeUsageDao(nodeId :int) {
            return def usageDao {
                to insertEvent(metric, value) {
                    def inserted := sql`INSERT INTO usage (nodeId,
metric, value)
                                                   VALUES ($nodeId,
$metric, $value)`
                    require(inserted == 1)
                }
            }
        }

Here, we give out usageDao objects that allow the holder to insert
events into a single table, and even then the rows are created only
with the object's ID. It's likely that you'd want to give out these
DAO objects to clients, rather than giving them the raw SQL authority.

On 11 March 2010 16:37, John Carlson <[email protected]> wrote:
> What I mean by that is the server could send the client a capability that
> the client could later use.
> John
>
> Begin forwarded message:
>
> From: John Carlson <[email protected]>
> Date: March 11, 2010 8:31:58 AM PST
> To: Discussion of E and other capability languages <[email protected]>
> Subject: Re: [e-lang] sql__quasiParser [patch]
>
> Any thought on making sql_quasiParser objects communicable across vats?




-- 
Dr Thomas Leonard		ROX desktop / Zero Install
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.