Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Gdbm module
- X-seq: zsh-workers 40612
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Gdbm module
- Date: Tue, 21 Feb 2017 20:41:32 -0800
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=brasslantern-com.20150623.gappssmtp.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=lTugeEdaGMZen/hk8NiZvp1HuYuVi1KQb5BFOldmj4U=; b=Nq/G+iRhoJlPwVFrpGjWqQXLxIGeEHCwKruft9GRBByt7dXIVJpyp4J26TphoD5wbn UuNMCLnCMN4jvq2l5zJidc4/RibKmVWqVu13sSpJZ3f3j3T5RMWi9zJxBpFDCh3WGk8p MUeqfzaDbQS4CJ30ySzOvJCgQoymYhqLa2mmKYVVQIQwnzz5FZg8fRqW4M0YFWT440rz Dn7ijHqkEuBS3Oe1XFsJmsKpLOwcAqZ0HGlM6QJlNUWXIo1+EdK18+0WHqXbzHjnLg7F LPM/JtDNlmktWTmXwsIKUJfZr/7vWCiv+4MW0CpJR+TxFTYUQWXb0xNziulTQs+NNC22 Usbw==
- In-reply-to: <1487706736.1879125.888350120.03C172EE@webmail.messagingengine.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVAz=zfrFapifcJudnMqgscNudC5S4S6ym7AWfFFORoROQ@mail.gmail.com> <170221092506.ZM14329@torch.brasslantern.com> <1487706736.1879125.888350120.03C172EE@webmail.messagingengine.com>
On Feb 21, 11:52am, Sebastian Gniazdowski wrote:
}
} [...] who would accept Oracle DBM module into Zsh?
Depends entirely on the licensing Oracle specifies.
} I looked at [sqlite], to do:
}
} result=sqlarray["SELECT telephone FROM contacts WHERE id=1"]
}
} And require single column to be selected, or concatenate columns
I would not suggest attempting to make a full SQL interface from the
tied hash to the database. GDBM is effectively one table per file
with a single unique key column, so the only thing you can do is
"SELECT * FROM ...". For a SQL-type database you'd probably want
to do something like
ztie -d db/sqlite -Q "SELECT ..." ... queryresult
and define queryresult in a manner similar to the way Perl DBI does
with fetchall_hashref.
This theoretical -Q option could be extended to GDBM as a way to
filter the set of keys fetched so the hash does not have to load the
entire dbmfile. However, at first we might prefer to restrict things
to flatter single-table access.
Also note I'm only trying to offer some guidelines here; I've seen no
evidence that this is needed or more than academically interesting.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author