Re: [gnome-db] prepare_create_database() and perform_create_database()
- From: "Vivien Malerba" <vmalerba gmail com>
- To: "Murray Cumming" <murrayc murrayc com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] prepare_create_database() and perform_create_database()
- Date: Tue, 14 Nov 2006 10:48:04 +0100
On 11/9/06, Murray Cumming <murrayc murrayc com> wrote:
On Wed, 2006-11-08 at 09:24 +0100, Vivien Malerba wrote:
> for example for the CREATE DATABASE operation, here is the
> list (badly indented...) where "path" is a parameter name:
> Path Type Required? Description
> /DB_DEF_P PARAMLIST Yes Database's description
> /DB_DEF_P/DB_NAME PARAM Yes Database name (string)
> /DB_DEF_P/DB_CSET PARAM Character set (string)
> /DB_DEF_P/DB_OWNER PARAM Database owner (string)
> /DB_DEF_P/DB_TABLESPACE PARAM Tablespace the
> database is in (string)
Surely, we _always_ need the database name, whatever provider we are
using. So that can be a parameter to prepare_create_database()?
I'm also surprised that both prepare_create_database() and
perform_create_database() take the provider name. Surely that should be
decided since calling prepare_create_database().
Yes, this can easily be done.
> An example of how to use the concept can be found in the
> testing/test-dyn-widgets.c file of libgnomedb starting line 2551.
That doesn't do database creation, and it's a bit hard for me to follow.
Yes, you can create databases with it: select a provider and then the
CREATE_DB operation, click on "test", fill in the values and click on
"Perform". I agree that the code is not easily understandable. I've
now integrated an example in the gnome-db-demo program.
The documentatino for the prepare_create_database() function needs to
give an example of what you might do next. For instance, what methods
you might call on the operation, with what parameters, before calling
Use gda_server_operation_get_root_nodes() to get a list of all the
"root" paths (nodes), and then use
gda_server_operation_get_node_info() with a path to get information
about a node.
Use gda_server_operation_get_value_at() and
gda_server_operation_set_value_at() to get and set values for any node
path.
perform_create_database(). And it needs to say exactly how to find out
what parameters are supported by the provider/operation.
The process to put this into the documentation should be automated
from the files in each provider, and would not work all the time
because each provider may alter the parameters in a GdaServerOperation
it creates to take into account the database specificities of the
database to which it's connected (for example, the choices of tables
storage engines in MySQL depends on the database to which one is
connected). What's in the documentation is the list of "normalized"
named parameters which one may find in a GdaServerOperation; for
example the "/DB_DEF_P/DB_NAME", will always be present in a
GdaServerOperation for the CREATE DATABASE operation, and corresponds
to the name of the database to create.
Some test code that does something similar is not enough. That's so
GNOME 1.4.
I'd be glad to have a regression tests framework, but I don't have the
time to do it; code is of course welcome!
Cheers,
Vivien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]