milestones to release greyhole
warnings on certain mount points not show mount points that are full (like my two or three iso-mounted images) sqlite show in the storage pool page the mounts that are in the db and not mounted atm, to allow the user to remove them if it's gone for good start a server by default with the default servers change greyhole to produce a PID in the .pid file
- allow the user to add mount points (this supports remote mounted file systems, in absence of automatic detection)
#1 Updated by cpg over 11 years ago
for the sql integration, it appears that only the following functions are mysql specific:
mysql_connect($db_host, $db_user, $db_pass) mysql_select_db($db_name); mysql_query(); mysql_escape_string($filename) mysql_fetch_object($result) mysql_num_rows($result) mysql_free_result($result);
there may be some mysql-specific sql too :(
there are two possible candidates for a shim layer to cover both mysql and sqlite:
- php-pdo (164k, but has a lot of dependencies)
- php-pear-MDB2 (724k, and somehow it's installed already in my hda and has some examples in it)
#2 Updated by gboudreau over 11 years ago
MDB2: Latest stable: 2007-05-03 (3 years old), Latest beta: 2009-01-14 (more than a year ago)
That seems quite old.
If you really want to use a data-access abstraction layer, I suggest PDO.
Myself, I'd use a home-made library; just abstract each db function in a new function, with a simple switch on the selected DBMS. Anything else would only add unnecessary layers & complexity for the simple use I do of the database.
#3 Updated by cpg over 11 years ago
- Assignee set to cpg
looks like there was almost a one-to-one mapping to the sqlite calls. i put a version zero of greyhole with sqlite support in the shared dropbox folder. by default, it should behave identically as the latest (i.e. using mysql).
to turn on sqlite, set sqlite = TRUE in the greyhole.conf file.
the file is called
guillaume, if you have a moment, would you take a gander?
Also available in: Atom