Re: [gnome-db] prepare_create_database() and perform_create_database()
- From: Murray Cumming <murrayc murrayc com>
- To: Vivien Malerba <vmalerba gmail com>
- Cc: gnome-db-list gnome org
- Subject: Re: [gnome-db] prepare_create_database() and perform_create_database()
- Date: Sat, 18 Nov 2006 16:27:17 +0100
On Sat, 2006-11-18 at 16:09 +0100, Vivien Malerba wrote:
> > Thanks. Although the provider name must not now be provided twice, I
> > still hope that prepare_create_database() could take the new database
> > name explicitly as a parameter.
>
> The name of the database to create, even if it's mandatory is just a
> named parameter among th other required parameters, so even if it was
> passed as a function argument, you'd still have to set the other names
> parameters "manually".
But this parameter is _always_ needed, regardless of the provider, so we
can make it
a) obvious that it's always needed.
b) easier to provide.
Maybe there are other parameters that are always needed.
> > Also, it would be nice if the documentation for these methods stated
> > whether it is necessary to first open a connection. I don't see how it
> > could create a database without knowing the other connection details,
> > such as hostname.
>
> As far as I know, no opened connection is ever required to perform a
> create db or drop db. When applicable (that is when there is a distant
> server) the information to connect to the server are among the
> required named parameters in the GdaServerOperation object.
OK. It would be nice if we could provide those connection details as
parameters, because they are always needed, but I guess there are too
many ways to specify that.
These "always needed" parameters should really be mentioned in the
documentation. There should be no need to dynamically discover what is
always needed.
> For example here are the named parameter for the create DB on a MySQL
> provider (as printed by the gnome-db-demo program):
> * /SERVER_CNX_P (GdaParameterList @0x8287590)
> * /SERVER_CNX_P/HOST (GdaParameter) = NULL
> * /SERVER_CNX_P/PORT (GdaParameter) = NULL
> * /SERVER_CNX_P/UNIX_SOCKET (GdaParameter) = NULL
> * /SERVER_CNX_P/ADM_LOGIN (GdaParameter) = NULL
> * /SERVER_CNX_P/ADM_PASSWORD (GdaParameter) = NULL
> * /SERVER_CNX_P/USE_SSL (GdaParameter) = NULL
> * /DB_DEF_P (GdaParameterList @0x83d8028)
> * /DB_DEF_P/DB_NAME (GdaParameter) = NULL
> * /DB_DEF_P/DB_IFNOTEXISTS (GdaParameter) = NULL
> * /DB_DEF_P/DB_CSET (GdaParameter) = NULL
> * /DB_DEF_P/DB_COLLATION (GdaParameter) = NULL
>
> and for the PostgreSQL one:
> * /SERVER_CNX_P (GdaParameterList @0x83d8028)
> * /SERVER_CNX_P/HOST (GdaParameter) = NULL
> * /SERVER_CNX_P/PORT (GdaParameter) = NULL
> * /SERVER_CNX_P/OPTIONS (GdaParameter) = NULL
> * /SERVER_CNX_P/ADM_LOGIN (GdaParameter) = NULL
> * /SERVER_CNX_P/ADM_PASSWORD (GdaParameter) = NULL
> * /SERVER_CNX_P/USE_SSL (GdaParameter) = NULL
> * /DB_DEF_P (GdaParameterList @0x83d82f0)
> * /DB_DEF_P/DB_NAME (GdaParameter) = NULL
> * /DB_DEF_P/DB_CSET (GdaParameter) = NULL
> * /DB_DEF_P/DB_OWNER (GdaParameter) = NULL
> * /DB_DEF_P/TEMPLATE (GdaParameter) = NULL
> * /DB_DEF_P/DB_TABLESPACE (GdaParameter) = NULL
>
> and for SQLite (which does not have a distant server):
> * /DB_DEF_P (GdaParameterList @0x80d5f90)
> * /DB_DEF_P/DB_NAME (GdaParameter) = NULL
> * /DB_DEF_P/DB_DIR (GdaParameter) = NULL
>
> Note some common named parameters (and maybe they should be included
> in the doc).
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]