fwiw,

i have also meddled with birdstep slightly, by making the namechange from
velocis to birdstep.

I agree with Dan -- i think it should be pecl'ed, and perhaps not so reliant
on the odbc stuff -- that whole extension is just confusing. That said, Dan
is the best person to work on with this.

 -- james

> -----Original Message-----
> From: Diggy Bell [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 18, 2002 3:49 AM
> To: Dan Kalowsky
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] Re: Support for Birdstep RDM Server database
> engine
>
>
> Thanks Dan,
>
> From looking at the module that was in ./ext/odbc, it was created using a
> somewhat earlier release of the RDM Server/Velocis (circa Velocis
> v2.x).  I
> had to make a number of changes related to API changes in Birdstep's
> libraries to support ODBC 3.51.  I've also started laying the
> groundwork to
> take advantage of scrollable cursors (a painful omission from the current
> version of RDM Server).
>
> Since there doesn't seem to be anyone familiar with Birdstep, I guess I
> could volunteer to be the 'expert'.  In reality, I was the first beta and
> deployed customer back in '92, and later went to work for the
> company (then
> Raima) in '94.  I was a Sr. Proj. Lead and Eng. Mgr. for their consulting
> subsidiary (Vista Development) until late 2000.
>
> These days I'm running my own business and use PHP for a variety of needs.
> But with Birdstep wanting this module, I became interested in
> being able to
> give back to the community more directly.  Supporters are great, but
> sometimes someone needs to get in the trenches and I guess I'm
> silly enough
> to want to do it. ;)
>
> With respect to the changes, I listed the changes that I've
> already made in
> the original post, but there are some additional mods that are needed.
>
> 1. There is currently no way to ensure that connections are
> closed properly.
> If a script doesn't call birdstep_close() the module will leak connection
> handles and will eventually exhaust available connections on the server.
>
> 2. Birdstep's support for LONG VARCHAR columns has some limitations
> surrounding use of SQLFetch vs. SQLFetchScroll.  To meet
> Birdstep's needs, I
> am using fixed buffers for these columns in the module.  I'm
> looking at the
> possibility of using RDM Server's BLOB handling functions (the
> 'd_' API) to
> allow for more efficient handling of these columns.
>
> 3. There are some significant improvements that could be made to the error
> handling.  The module currently has no access to error
> information returned
> from the server.  There are also a few places in the code that could be
> handled a little more gracefully if an error occurs.
>
> As for the PECL module, I'll have to do a little more investigation into
> what would be required.  I got started with the standard extension
> architecture and worked from there.  If the change to PECL is
> straightfoward, I'll go ahead and start looking at getting that done.  If
> you can point at any good reference sources, I'd be most thankful! :-D
>
> Diggy
>
> ----- Original Message -----
> From: "Dan Kalowsky" <[EMAIL PROTECTED]>
> To: "Diggy Bell" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Sunday, November 17, 2002 12:42 PM
> Subject: Re: [PHP-DEV] Re: Support for Birdstep RDM Server database engine
>
>
> > Hello Diggy,
> >
> > Birdstep was rolled into the ODBC functionality, and has really not
> > seen any support since.  I don't believe anyone currently on the PHP
> > staff is really familiar with the way the Birdstep systems work.  The
> > reality is though that I don't see many PHP users using
> > Birdstep/Velocis support.  This could of course be a chicken/egg
> > problem, where the PHP support is lacking etc etc...
> >
> > What are the changes you're planning to do?  If you'd like to make
> > birdstep it's own module, I'd suggest looking at creating it as a PECL
> > module, and working from there.
> >
> > Typically we don't discourage integration with systems/API's,
> > especially if the author is willing to maintain it :)
> >
> > On Sunday, November 17, 2002, at 03:30 PM, Diggy Bell wrote:
> >
> > > Hello again,
> > >
> > > I've not heard anything from anybody regarding my previous post.  My
> > > first
> > > thought is that everyone is caught up in the release activities, but I
> > > would
> > > appreciate any comments that anyone might be able to offer.
> > >
> > > Thanks,
> > >
> > > Diggy
> > >
> > > "Diggy Bell" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > >> Hello All,
> > >>
> > >> I have recently been approached by Birdstep about updating the PHP
> > >> module
> > > to
> > >> support their database engine for an internal project.  In the past
> > > (v4.1.2
> > >> and earlier IIRC), PHP has provided support for the Birdstep
> (formerly
> > >> Velocis) database as part of the distribution.  Since v4.1.2 (IIRC)
> > >> this
> > >> support has been dropped in the standard source tree.  But, I was
> > >> able to
> > >> locate the old code under ./ext/odbc and so I have resurrected the
> > >> module.
> > >> In the process, I have made a number of modifications and additions
> > >> to the
> > >> library to bring it up to date with the latest version of Birdstep's
> > >> product.
> > >>
> > >> My main question is:  Is this module something that the community
> > >> would
> > > like
> > >> to have available again?  If so, I am willing to pick up the
> > >> maintenance
> > >> duties on the module.  I'm a former employee of the company and have
> > > access
> > >> to 'back-door' support when necessary.
> > >>
> > >> I've taken a bit of time and put together some notes on the
> > >> modifications
> > >> that I have made to this point.  These notes are copied below for
> > >> review.
> > >> I've also attached the modified source files.  (NOTE:  I
> realize these
> > >> aren't formatted to PHP standards...please let me slide on that one
> > >> while
> > >> I'm making more significant changes :-P)  If there is interest, I am
> > >> also
> > >> considering addiing some enhancements for connection management and
> > >> error
> > >> handling.
> > >>
> > >> Any thoughts/comments would be appreciated.
> > >>
> > >> --
> > >> William D. 'Diggy' Bell
> > >> Principal
> > >> DB Software Development
> > >> http://www.dbsoftdev.com
> > >>
> > >> /***** CUT HERE *****/
> > >>
> > >> Birdstep PHP Extension
> > >> Design Specification
> > >>
> > >> Date: 11/14/2002
> > >> By: William D. 'Diggy' Bell
> > >>
> > >> INTRODUCTION
> > >>
> > >> The Birdstep PHP Extension allows PHP applications to access the
> > >> Birdstep
> > >> RDM Server database engine.
> > >>
> > >> REQUIREMENTS
> > >>
> > >> 1. Support for LONG VARCHAR columns
> > >> 2. Positioned fetch operations
> > >> 3. Support for birdstep_fetch_array()
> > >> 4. Support for birdstep_num_fields()
> > >> 5. Support for birdstep_affected_rows()
> > >>
> > >> DESIGN CONSIDERATIONS
> > >>
> > >> 1. API conflict between SQLFetchScroll and SQLGetData
> > >>
> > >> There is a current design limitation in the RDM Server that prevents
> > >> the
> > > use
> > >> of SQLGetData() with rowsets that have been retrieved using
> > >> SQLFetchScroll().  This
> > >> limitation strongly impacts how LONG VARCHAR fields can be handled.
> > >> Two
> > >> methods are described below.
> > >>
> > >> a. Use SQLFetch() instead of SQLFetchScroll().
> > >>
> > >> The requirement for positioned fetch operations eliminates this
> > >> option.
> > >>
> > >> b. Use a maximum sized buffer for LONG VARCHAR columns
> > >>
> > >> In this method, a buffer of a fixed maximum size would be allocated
> > >> for
> > > each
> > >> LONG VARCHAR column.  The column would then be bound using
> > >> SQLBindCol() to
> > >> retrieve the data in one operation.
> > >>
> > >> Option (b) was chosen because it allows support for SQLFetchScroll().
> > > This
> > >> can have
> > >> significant implications on applications that have a large number of
> > >> LONG
> > >> VARCHAR
> > >> columns due to unnecessarily high memory requirements.
> > >>
> > >> NOTE: There are additional limitations in the RDM Server engine that
> > >> have
> > >> prevented
> > >> implementation of cursor positioning.  SQLFetchScroll will continue
> > >> to be
> > >> used for
> > >> smoothest migration when RDM Server support for cursor positioning is
> > > added.
> > >>
> > >> INTERNAL DATA STRUCTURES
> > >>
> > >> typedef struct VConn {
> > >>  HDBC     hdbc;
> > >>  long     index;
> > >>    int      connected;
> > >> } VConn;
> > >>
> > >> typedef struct {
> > >>  char     name[32];
> > >>  char*    value;
> > >>  long     vallen;
> > >>  SDWORD   valtype;
> > >> } VResVal;
> > >>
> > >> typedef struct Vresult {
> > >>  HSTMT    hstmt;
> > >>  VConn*   conn;
> > >>  long     index;
> > >>  VResVal* values;
> > >>  long     numcols;
> > >>  int      fetched;
> > >> } Vresult;
> > >>
> > >> typedef struct _php_birdstep_globals
> > >> {
> > >>    long     num_links;
> > >>    long     max_links;
> > >>    int      le_link;
> > >>    int      le_result;
> > >> } php_birdstep_globals;
> > >>
> > >> INTERNAL FUNCTIONS
> > >>
> > >> PHP_MINIT_FUNCTION(birdstep)
> > >> PHP_MSHUTDOWN_FUNCTION(birdstep)
> > >> PHP_RINIT_FUNCTION(birdstep)
> > >> PHP_RSHUTDOWN_FUNCTION(birdstep)
> > >> PHP_MINFO_FUNCTION(birdstep)
> > >>
> > >> APPLICATION PROGRAMMING INTERFACE
> > >>
> > >> birdstep_connect($server, $user, $password)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $server     -  RDM Server name
> > >>    $user       -  database user name
> > >>    $password   -  user's password
> > >>
> > >> Returns:
> > >>
> > >>    connection handle
> > >>
> > >> Description:
> > >>
> > >>    This function will connection to the RDM Server identified by
> > >> $server.
> > >> The
> > >>    $user and $password must be valid users on the server.
> > >>
> > >> birdstep_close($conn)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $conn       -  connection handle to close
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will close the specified connection to the
> RDM Server
> > >>
> > >> birdstep_exec($conn, $sql)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $conn       -  database connection handle
> > >>    $sql        -  SQL statement to be executed
> > >>
> > >> Returns:
> > >>
> > >>    Result index if successful, Zero if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will execute the $sql statement on the server
> > >> identified
> > > by
> > >> $conn
> > >>
> > >> birdstep_fetch($result)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $result     -  result set index (from birdstep_exec())
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will retrieve the next row from a result set.
> > >>
> > >> birdstep_fetch_array($result)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $result     -  result set index (from birdstep_exec())
> > >>
> > >> Returns:
> > >>
> > >>    Associative array of column values with column names as key names.
> > >>
> > >> Description:
> > >>
> > >>    This function will retrieve a row from a result set and return the
> > >> results as an
> > >>    associative array.  The column names will be assigned to the key
> > >> names.
> > >> The
> > >>    data values will be assigned to the array elements.
> > >>
> > >> birdstep_result($result, $index)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $result     -  result set index (from birdstep_exec())
> > >>    $index      -  column index to be retrieved
> > >>
> > >> Returns:
> > >>
> > >>    The value of the column specified by $index in the result set,
> > >> $result.
> > >> FALSE
> > >>    if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function is used to retrieve a column value from the current
> > >> row
> > > in
> > >> the
> > >>    result set.
> > >>
> > >> birdstep_freeresult($result)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $result     -  result set index (from birdstep_exec())
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will free a result set that has been previously
> > >> allocated
> > >> using
> > >>    the birdstep_exec() function.
> > >>
> > >> birdstep_autocommit($conn)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $conn       -  database connection handle
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will enable the auto-commit feature of RDM Server.
> > >>
> > >> birdstep_off_autocommit($conn)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $conn       -  database connection handle
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will disable the auto-commit feature of RDM Server.
> > >>
> > >> birdstep_commit($conn)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>   $conn        -  database connection handle
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will commit changes to the database during a
> > >> transaction.
> > >>
> > >> birdstep_rollback($conn)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>   $conn        -  database connection handle
> > >>
> > >> Returns:
> > >>
> > >>    TRUE if successful, FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will rollback changes to the database during a
> > > transaction.
> > >>
> > >> birdstep_num_fields($result)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>    $result     -  result set index (from birdstep_exec())
> > >>
> > >> Returns:
> > >>
> > >>    Number of columns in result set, or FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will retrieve the number of columns in the result
> > >> set.
> > >>
> > >> birdstep_field_name($result $index)
> > >> ---------------------------------------------------------------------
> > >> Parameters:
> > >>
> > >>   $result      -  result set index (from birdstep_exec())
> > >>   $index       -  column index of column name to retrieve
> > >>
> > >> Returns:
> > >>
> > >>    Column name, or FALSE if an error occurred.
> > >>
> > >> Description:
> > >>
> > >>    This function will retrieve the name of the column represented by
> > > $index.
> > >>
> > >> OPEN ITEMS
> > >>
> > >> 1. LONG VARCHAR Max Length
> > >>
> > >> The maximum length for a LONG VARCHAR column is currently a #define.
> > >> This
> > >> should be moved to an INI entry and managed through the Zend INI
> > > interface.
> > >>
> > >>
> > >>
> > >
> > >
> > >
> > > --
> > > PHP Development Mailing List <http://www.php.net/>
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >  >---------------------------------------------------------------<
> > Dan Kalowsky                    "Tonight I think I'll walk alone,
> > http://www.deadmime.org/~dank    I'll find myself as I go home"
> > [EMAIL PROTECTED]        - "Temptation",
> > [EMAIL PROTECTED]                          New Order
> >
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to