Re: [gnome-db] Oracle create database for libgda



On Wed, 2002-06-19 at 05:35, Tim Coleman wrote:
> I was looking at what is still outstanding on the libgda oracle provider
> that I've been working on, and one of them is the create_database
> handler.
> 
> As you may be aware, the Oracle create database command takes
> a lot of parameters.  As you may also be aware, the create_database
> handler does not take any parameters other than the name.
> 
> This is a dilemma that I think we could fix by adding a parameter
> list to the create_database function.  I'm not entirely sure how we
> would extract the parameters in a meaningful way though, based
> on the oracle create database command syntax.
> 
> Here's a description of that syntax [1]
> 
> create_database::=
> CREATE DATABASE [database]
> { CONTROLFILE REUSE
> | LOGFILE [GROUP integer] filespec [, [GROUP integer] filespec]...
> | MAXLOGFILES integer
> | MAXLOGMEMBERS integer
> | MAXLOGHISTORY integer
> | MAXDATAFILES integer
> | MAXINSTANCES integer
> | { ARCHIVELOG | NOARCHIVELOG }
> | CHARACTER SET charset
> | NATIONAL CHARACTER SET charset
> | DATAFILE filespec [autoextend_clause] [, filespec [autoextend_clause]]...
> | default_temp_tablespace
> | undo_tablespace_clause
> | SET STANDBY DATABASE { PROTECTED | UNPROTECTED }
> | set_time_zone_clause
> }...
> 
> autoextend_clause::=
> AUTOEXTEND { OFF | ON [NEXT integer [ K | M ]] [maxsize_clause] }
> 
> maxsize_clause::=
> MAXSIZE { UNLIMITED | integer [ K | M ] }
> 
> default_temp_tablespace::=
> DEFAULT TEMPORARY TABLESPACE tablespace [TEMPFILE filespec] temp_tablespace_extent_clause
> 
> temp_tablespace_extent::=
> [EXTENT MANAGEMENT LOCAL] [UNIFORM [SIZE integer [ K | M ]]]
> 
> undo_tablespace_clause::=
> UNDO TABLESPACE tablespace
> [DATAFILE filespec [autoextend_clause] [, filespec [autoextend_clause]]...]
> 
> As you can see, many of the parameters can be repeated, or are entirely
> optional.  The second is, of course, easy to deal with, but is the first?
> And what kind of names should the parameters have? 
> 
> Or should the parameters themselves just be a list of options which are 
> tacked onto the end of the create database statement?  This option
> is probably the most flexible.
> 
yes, that sounds the best thing, that is:

create_database (cnc, dbname, parameter_list)

and have the parameter list be used for sending that kind of arguments.
For repeating parameters, I think you can just use a GdaValueList for
the value for a given GdaParameter in the list.

One thing we should do also to correctly support this is to define a set
of #define's for the parameters, so that clients don't have to guess
them.

As you already know, Tim, I'm really busy this week, so I won't do that
until I fly back home (Saturday, and if I don't sleep in the plane :-),
so either wait for me to have some chance to do it, or please, send a
patch :-)

cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]