Module: dylan-user Author: eec Version: $(HopeName) Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define library sql-odbc use functional-dylan; use generic-arithmetic; use sql, import: {sql}; use odbc-ffi, import: {odbc-ffi}; use io; use system; use c-ffi; export sql-odbc; end library sql-odbc; define module sql-odbc use sql, import: all, export: all; use odbc-ffi, import: { *trace-odbc-functions* }, export: { *trace-odbc-functions* }; // Debugging functions used to determine if finalization is occurring. // Once the gc limitation on weak tables is fixed, these functions // will no longer be needed. create set-finalize-notification, notify-of-finalization; create assert-odbc-goodness, report-condition, *odbc-print-condition*, *odbc-report-success-with-info*, *odbc-report-*; create , , , low-level-error-sqlstate; create , %environment-handle, , user-name, user-name-setter, password, password-setter, , datasource-name, datasource-name-setter, , %connection-handle; //++ Why is this exported? create , %statement-handle; create , , , ; create , , , , ; create , problem-diagnostic, diagnostic-return-code, , , , server-name, row-number, column-number, , connection-exception-user, connection-exception-database, connection-exception-dbms, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ; end module; define module sql-odbc-nice-layer //+++ Once the FFI is stable, I hope to do away with this module use functional-dylan; use c-ffi; use sql; use odbc-ffi; use format-out; use dylan-direct-c-ffi; //++++ for hokey garbage collection lossage. Lose this. export , , , ; export $null-statement-handle, $null-environment-handle, $null-connection-handle; export null-odbc-field?, nice-SQLFreeEnv, nice-SQLError, nice-SQLConnect, nice-SQLDriverConnect, nice-SQLPrepare, nice-SQLExecute, nice-SQLExecDirect, nice-SQLFetch, nice-SQLBindCol, nice-SQLAllocStmt, nice-SQLFreeStmt, nice-SQLAllocHandle, nice-SQLFreeHandle, nice-SQLNumResultCols, nice-SQLDescribeCol, nice-SQLTables, nice-SQLColumns, nice-SQLStatistics, nice-SQLGetConnectOption, nice-SQLGetConnectAttr, nice-SQLSetConnectAttr, nice-SQLGetDiagField, nice-SQLGetDiagRec, nice-SQLGetInfo; end module; define module sql-odbc-conditions use functional-dylan; use format-out; use sql; use odbc-ffi; use sql-odbc-nice-layer; use sql-odbc; end module; define module sql-odbc-implementation use functional-dylan; use generic-arithmetic, prefix: "big/"; use dylan-extensions; use machine-words; use machine-word-lowlevel; use threads; use finalization; use c-ffi; use format-out; use format; use date; use dylan-primitives; use sql-odbc-nice-layer; use odbc-ffi; use sql; use sql-odbc; export , binding-name, sql-binding-info; end module;