
There is no documentation.

But, there are hints - which you should read.

- Read the MySQL C API. These are (with the single exception of
  mysql_fetch_field_direct) the functions available to you from STk.
  Please make an effort to understand the MySQL API before you ask me
  questions :-) The files client/libmysql.c and include/mysql.h in the
  MySQL distribution are where you'll find a lot of what you need to
  know to understand how this STk/MySQL interface works and why I had
  to make some slight changes (see below). Of course you should also
  have the MySQL C API documentation handy.

- The STk API function names are formed using the following rules

    s/^mysql_/mysql:/
    s/_/-/g

  In other words, mysql_close becomes mysql:close, and
  mysql_real_connect becomes mysql:real-connect. I am told this is The
  Way Things Are Done in the Scheme world. I am not a Scheme
  programmer.

- All MySQL API functions that return a char * return an STk string, so
  there is no need for you to be calling (c-string->string), that is
  done for you.

- There are 3 functions in the MySQL API that you will have to call
  differently:

    1) mysql_escape_string should be called as
    (mysql:stk-escape-string string) which returns an escaped
    string. You cannot use mysql_escape_string because its calling
    convention cannot be dealt with in a straightforward manner by the
    STk/C interface. See the NOTES file for a few more details or read
    the simple source in libmysqlclientstk.c. Note that you do not
    need to pass a length to this function (as you do in the C MySQL
    API), as this is dealt with for you by the STk/MySQL interface.

    2) Use mysql:fetch-column to get a specific column from a
    MYSQL_ROW. In C you'd just index into the MYSQL_ROW array, but you
    can't do this in STk since there is no way for the C function to
    say it is returning an array of char *. So you do things like this

      (set! value (mysql:fetch-column row 3))

    to get the 4th column value. Columns start at 0, as in the MySQL API.

    3) Similarly, use (mysql:fetch-length lengths 3) to get the length
    of the fourth column, where lengths is the thing you get back from
    calling mysql:fetch-lengths.

- There is a Boolean function (mysql:error?) which will tell you if
  there has been some sort of MySQL error. You can use mysql:error and
  mysql:errno to get MySQL error messages and numbers as
  usual. Remember that these API calls all make an extra trip to the
  MySQL server, so you should try to use the return values of the API
  calls where possible.

- The function mysql_fetch_field_direct is not available to STk
  programs. If you need it, support for it could be added without much
  effort (see the NOTES file).

- Quite a few functions in the STk/MySQL API return a Boolean. You
  should note that a return value of #f does not always indicate
  false. It might indiacte that there has been some sort of error. If
  you intend to write robust code, you'll want to be checking for
  errors with (mysql:error?) after getting a #f back from a Boolean
  function. I'm sorry this is awkward, but there's not much I could
  think of to help it. You can always write beautiful non-robust code
  and ignore errors.

- The function (mysql:stk-version) will produce a string to show you
  what version of this interface you are using.

