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
tosupport their database engine for an internal project. In the past(v4.1.2and 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
liketo 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
accessto '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
useof 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
eachLONG 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().
Thiscan 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
inthe
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