Boost logo

Boost-Commit :

From: nicola.musatti_at_[hidden]
Date: 2008-01-11 17:40:11


Author: nmusatti
Date: 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
New Revision: 42687
URL: http://svn.boost.org/trac/boost/changeset/42687

Log:
SqlCli first upload
Added:
   sandbox/sql_cli/
   sandbox/sql_cli/boost/
   sandbox/sql_cli/boost/sql_cli/
   sandbox/sql_cli/boost/sql_cli.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/column.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/connection.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/
   sandbox/sql_cli/boost/sql_cli/detail/backend.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/backend_traits.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/column_base.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/config.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/connection_base.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/field_base.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/result_set_base.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/result_set_iterator.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/row_base.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/statement_base.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/static_param.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/static_value.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/detail/value_types.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/error.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/field.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/null_value.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_column.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_config.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_connection.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_environment.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_error.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_field.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_handle.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_param.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_result_set.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_row.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_state.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/odbc_statement.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/traits.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/odbc/value_buffer.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/result_set.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/row.hpp (contents, props changed)
   sandbox/sql_cli/boost/sql_cli/statement.hpp (contents, props changed)
   sandbox/sql_cli/libs/
   sandbox/sql_cli/libs/sql_cli/
   sandbox/sql_cli/libs/sql_cli/build/
   sandbox/sql_cli/libs/sql_cli/build/Jamfile (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/Jamfile.v2 (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.sln (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.suo (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.vcproj (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/demo.vcproj (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/readme.txt (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/setup.bat (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/build/odbc.jam (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/
   sandbox/sql_cli/libs/sql_cli/doc/Jamfile.v2 (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/architecture.qbk (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/
   sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/
   sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/architecture.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/open_issues.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/reference.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/todo.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/boostbook.css (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/index.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/annotated.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1column-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1column.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1connection-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1connection.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1error-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1error.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1field-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1field.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__data-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__data.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__value-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1result__set-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1result__set.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1row-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1row.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1statement-members.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1statement.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/doxygen.css (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/doxygen.png (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/functions.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/functions_func.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/hierarchy.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/index.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/structboost_1_1sql__cli_1_1null__value.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/tab_b.gif (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/tab_l.gif (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/tab_r.gif (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/html/reference/tabs.css (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/open_issues.qbk (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/readme.txt (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/sql_cli.qbk (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/doc/todo.qbk (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/example/
   sandbox/sql_cli/libs/sql_cli/example/Jamfile (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/example/Jamfile.v2 (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/example/demo.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/index.html (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/
   sandbox/sql_cli/libs/sql_cli/src/backend.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/odbc_column.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/odbc_connection.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/odbc_environment.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/odbc_result_set.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/odbc_state.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/src/odbc_statement.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/
   sandbox/sql_cli/libs/sql_cli/test/Jamfile.v2 (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/direct_statements_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/field_types_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/null_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/numeric_types_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/prepared_statements_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/scalar_types_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/string_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/test.hpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/tinyint_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/trivial_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/unsigned_types_test.cpp (contents, props changed)
   sandbox/sql_cli/libs/sql_cli/test/wide_string_test.cpp (contents, props changed)

Added: sandbox/sql_cli/boost/sql_cli.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,20 @@
+// Boost.Dbi library -------------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_HPP)
+#define BOOST_SQL_CLI_HPP
+
+#include <boost/sql_cli/error.hpp>
+#include <boost/sql_cli/connection.hpp>
+#include <boost/sql_cli/statement.hpp>
+#include <boost/sql_cli/column.hpp>
+#include <boost/sql_cli/field.hpp>
+#include <boost/sql_cli/row.hpp>
+#include <boost/sql_cli/result_set.hpp>
+
+#endif // ! defined(BOOST_SQL_CLI_HPP)

Added: sandbox/sql_cli/boost/sql_cli/column.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/column.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,56 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_COLUMN_HPP)
+#define BOOST_SQL_CLI_COLUMN_HPP
+
+#include <string>
+#include <typeinfo>
+
+#include <boost/shared_ptr.hpp>
+
+#include <boost/sql_cli/detail/column_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+class result_set;
+
+//! @class column column.hpp boost/sql_cli/column.hpp
+//! @brief Provides a description for one %column in a result set.
+
+class column
+{
+public:
+ //! Returns the column's name.
+ std::string name() const { return col->name(); }
+ //! Returns the type_info object associated with the column's C++ type.
+ const std::type_info & type() const { return col->type(); }
+ //! Returns the column's size.
+ int size() const { return col->size(); }
+ //! Returns the column's precision.
+ int precision() const { return col->precision(); }
+ //! Indicates whether the columns accepts null values.
+ bool nullable() const { return col->nullable(); }
+ //! Returns the column's number.
+ int number() const { return col->number(); }
+
+private:
+ friend class result_set;
+
+ column(boost::shared_ptr<detail::column_base> const & c) : col(c) {}
+
+ boost::shared_ptr<detail::column_base> col;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_COLUMN_HPP)

Added: sandbox/sql_cli/boost/sql_cli/connection.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/connection.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,91 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_CONNECTION_HPP)
+#define BOOST_SQL_CLI_CONNECTION_HPP
+
+#include <memory>
+#include <string>
+
+#include <boost/scoped_ptr.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <boost/sql_cli/detail/backend.hpp>
+#include <boost/sql_cli/detail/connection_base.hpp>
+#include <boost/sql_cli/detail/statement_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+
+//! @class connection connection.hpp boost/sql_cli/connection.hpp
+//! @brief Represents a %connection to a database of a specific backend type.
+//! Different connection instances may be used in different threads without
+//! explicit synchronization.
+//! @nosubgrouping
+
+class connection
+{
+public:
+ //! @name Constructors
+ //@{
+ //! Initializes the backend specified in the 'dbms' argument.
+ connection(std::string const & dbms) { init(dbms); }
+ //! @brief Initializes the backend and opens the 'srv' database, with
+ //! user 'user' and password 'auth'.
+ connection(std::string const & dbms, std::string const & srv,
+ std::string const & user, std::string const & auth)
+ {
+ init(dbms);
+ connect(srv, user, auth);
+ }
+ //@}
+
+ //! @name Connection management
+ //@{
+ //! Opens the 'srv' database, with user 'user' and password 'auth'.
+ void connect(std::string const & srv, std::string const & user,
+ std::string const & auth)
+ {
+ conn->connect(srv, user, auth);
+ }
+
+ //! Closes the %connection to the database.
+ void disconnect() { conn->disconnect(); }
+ //@}
+
+ //! @name Transaction management
+ //@{
+ //! Commits the current transaction.
+ void commit() { conn->commit(); }
+ //! Rolls back the current transaction.
+ void rollback() { conn->rollback(); }
+ //@}
+
+private:
+ friend class statement;
+
+ void init(std::string const & dbms)
+ {
+ conn.reset(detail::backend::create_connection(dbms).release());
+ }
+
+ std::auto_ptr<detail::statement_base> create_statement() const
+ {
+ return conn->create_statement();
+ }
+
+ boost::scoped_ptr<detail::connection_base> conn;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_CONNECTION_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/backend.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/backend.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,74 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_BACKEND_HPP)
+#define BOOST_SQL_CLI_DETAIL_BACKEND_HPP
+
+#include <cassert>
+#include <map>
+#include <memory>
+#include <string>
+
+#include <boost/sql_cli/detail/config.hpp>
+#include <boost/sql_cli/detail/backend_traits.hpp>
+
+// this must occur after all of the includes and before any code appears:
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+class connection_base;
+
+class BOOST_SQL_CLI_DECL backend
+{
+public:
+ static std::auto_ptr<connection_base> create_connection(std::string const & dbms);
+
+protected:
+ backend(std::string const & dbms);
+
+private:
+ virtual std::auto_ptr<connection_base> create_connection() const = 0;
+
+ static std::map<std::string, backend *> backends;
+};
+
+template <typename ServerT>
+class backend_helper : public backend
+{
+public:
+ typedef ServerT server_type;
+ typedef backend_traits<server_type> traits_type;
+
+ backend_helper(std::string const & dbms) : backend(dbms) {}
+
+ std::auto_ptr<connection_base> create_connection() const
+ {
+ std::auto_ptr<connection_base> c (
+ new typename traits_type::connection_type);
+ return c;
+ }
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+// the suffix header occurs after all of our code:
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_BACKEND_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/backend_traits.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/backend_traits.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,57 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_BACKEND_TRAITS_HPP)
+#define BOOST_SQL_CLI_DETAIL_BACKEND_TRAITS_HPP
+
+#include <string>
+
+namespace boost
+{
+namespace sql_cli
+{
+
+// Backend How-To: Declare your connection class
+
+namespace odbc
+{
+class connection;
+} // namespace odbc
+
+namespace detail
+{
+
+// Backend How-To: Add a tag type for your backend
+
+struct odbc_tag {};
+
+template <typename ServerT>
+struct backend_traits
+{
+ typedef void connection_type;
+};
+
+template <typename ConnectionT>
+struct backend_traits_base
+{
+ typedef ConnectionT connection_type;
+};
+
+// Backend How-To: Define a backend_traits specialization for your backend
+
+template <>
+struct backend_traits<odbc_tag> : backend_traits_base<odbc::connection>
+{
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_BACKEND_TRAITS_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/column_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/column_base.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,39 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_COLUMN_BASE_HPP)
+#define BOOST_SQL_CLI_DETAIL_COLUMN_BASE_HPP
+
+#include <string>
+#include <typeinfo>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+
+class column_base
+{
+public:
+ virtual ~column_base() {}
+ virtual std::string name() const = 0;
+ virtual const std::type_info & type() const = 0;
+ virtual int size() const = 0;
+ virtual int precision() const = 0;
+ virtual bool nullable() const = 0;
+ virtual int number() const = 0;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_COLUMN_BASE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/config.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/config.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,55 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_CONFIG_HPP)
+#define BOOST_SQL_CLI_DETAIL_CONFIG_HPP
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_HAS_DECLSPEC // defined in config system
+// we need to import/export our code only if the user has specifically
+// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
+// libraries to be dynamically linked, or BOOST_SQL_CLI_DYN_LINK
+// if they want just this one to be dynamically liked:
+# if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SQL_CLI_DYN_LINK)
+// export if this is our own source, otherwise import:
+# ifdef BOOST_SQL_CLI_SOURCE
+# define BOOST_SQL_CLI_DECL __declspec(dllexport)
+# else
+# define BOOST_SQL_CLI_DECL __declspec(dllimport)
+# endif // BOOST_SQL_CLI_SOURCE
+# endif // DYN_LINK
+#endif // BOOST_HAS_DECLSPEC
+//
+// if BOOST_SQL_CLI_DECL isn't defined yet define it now:
+#ifndef BOOST_SQL_CLI_DECL
+# define BOOST_SQL_CLI_DECL
+#endif
+
+//
+// Automatically link to the correct build variant where possible.
+//
+#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SQL_CLI_NO_LIB) && !defined(BOOST_SQL_CLI_SOURCE)
+//
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it:
+//
+#define BOOST_LIB_NAME boost_sql_cli
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SQL_CLI_DYN_LINK)
+# define BOOST_DYN_LINK
+#endif
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+#endif // auto-linking disabled
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_CONFIG_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/connection_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/connection_base.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,48 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_CONNECTION_BASE_HPP)
+#define BOOST_SQL_CLI_DETAIL_CONNECTION_BASE_HPP
+
+#include <string>
+#include <memory>
+
+namespace boost
+{
+namespace sql_cli
+{
+class connection;
+
+namespace detail
+{
+class statement_base;
+
+class connection_base
+{
+public:
+ virtual ~connection_base() {}
+
+ virtual void connect(std::string const & srv, std::string const & user,
+ std::string const & auth) = 0;
+ virtual void disconnect() = 0;
+
+ virtual void commit() = 0;
+ virtual void rollback() = 0;
+
+private:
+ friend class sql_cli::connection;
+
+ virtual std::auto_ptr<statement_base> create_statement() = 0;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_CONNECTION_BASE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/field_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/field_base.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,40 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_FIELD_BASE_HPP)
+#define BOOST_SQL_CLI_DETAIL_FIELD_BASE_HPP
+
+#include <boost/sql_cli/detail/static_value.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+class field;
+
+namespace detail
+{
+
+class field_base
+{
+public:
+ virtual ~field_base() {}
+ virtual int number() const = 0;
+
+private:
+ friend class field;
+
+ virtual void get(static_value & sv) const = 0;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_FIELD_BASE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/result_set_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/result_set_base.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,50 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_RESULT_SET_BASE_HPP)
+#define BOOST_SQL_CLI_DETAIL_RESULT_SET_BASE_HPP
+
+#include <memory>
+#include <string>
+
+#include <boost/shared_ptr.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+class result_set;
+
+namespace detail
+{
+class column_base;
+class row_base;
+class result_set_iterator;
+
+class result_set_base
+{
+public:
+ virtual ~result_set_base() {}
+ virtual int column_count() const = 0;
+
+private:
+ friend class sql_cli::result_set;
+ friend class result_set_iterator;
+
+ virtual boost::shared_ptr<column_base> get_column(int n) = 0;
+ virtual boost::shared_ptr<column_base>
+ get_column(std::string const & n) = 0;
+ virtual std::auto_ptr<detail::row_base> create_row() = 0;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_RESULT_SET_BASE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/result_set_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/result_set_iterator.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,66 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_RESULT_SET_ITERATOR_HPP)
+#define BOOST_SQL_CLI_DETAIL_RESULT_SET_ITERATOR_HPP
+
+#include <cassert>
+#include <memory>
+
+#include <boost/iterator/iterator_facade.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <boost/sql_cli/row.hpp>
+#include <boost/sql_cli/detail/result_set_base.hpp>
+#include <boost/sql_cli/detail/row_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+
+class result_set_iterator : public boost::iterator_facade<result_set_iterator,
+ row const, std::input_iterator_tag>
+{
+public:
+ result_set_iterator() : rsb(0) {}
+ explicit result_set_iterator(result_set_base * r) : rsb(r) { increment(); }
+
+private:
+ friend class boost::iterator_core_access;
+
+ void increment()
+ {
+ assert(rsb);
+ std::auto_ptr<row_base> rb(rsb->create_row());
+ curr.reset(rb.get() ? new sql_cli::row(rb) : 0);
+ }
+
+ bool equal(result_set_iterator const& other) const
+ {
+ return rsb == other.rsb && ! rsb || curr == other.curr;
+ }
+
+ sql_cli::row & dereference() const
+ {
+ assert(rsb);
+ return *curr;
+ }
+
+ result_set_base * rsb;
+ boost::shared_ptr<sql_cli::row> curr;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_RESULT_SET_ITERATOR_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/row_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/row_base.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,34 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_ROW_BASE_HPP)
+#define BOOST_SQL_CLI_DETAIL_ROW_BASE_HPP
+
+#include <boost/shared_ptr.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+class field_base;
+
+class row_base
+{
+public:
+ virtual ~row_base() {}
+ virtual boost::shared_ptr<field_base> get_field(int i) = 0;
+ virtual boost::shared_ptr<field_base> get_field(std::string const & n) = 0;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_ROW_BASE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/statement_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/statement_base.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,48 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_STATEMENT_BASE_HPP)
+#define BOOST_SQL_CLI_DETAIL_STATEMENT_BASE_HPP
+
+#include <memory>
+#include <string>
+
+#include <boost/sql_cli/detail/static_param.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+class statement;
+
+namespace detail
+{
+class result_set_base;
+
+class statement_base
+{
+public:
+ virtual ~statement_base() {}
+ virtual void prepare(std::string const & s) = 0;
+ virtual void exec() = 0;
+ virtual void exec(std::string const & s) = 0;
+
+private:
+ friend class sql_cli::statement;
+
+ virtual std::auto_ptr<result_set_base> create_result_set() const = 0;
+
+ virtual void bind_param(int n, static_param sp) = 0;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_STATEMENT_BASE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/static_param.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/static_param.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,94 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_STATIC_PARAM_HPP)
+#define BOOST_SQL_CLI_DETAIL_STATIC_PARAM_HPP
+
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/variant/apply_visitor.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <boost/sql_cli/detail/value_types.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+
+typedef boost::mpl::transform<value_types, boost::add_pointer<boost::mpl::_1> >::type pointer_value_types;
+typedef boost::mpl::transform<optional_types, boost::add_pointer<boost::mpl::_1> >::type pointer_optional_types;
+typedef boost::mpl::transform<null_types, boost::add_pointer<boost::mpl::_1> >::type pointer_null_types;
+
+typedef boost::make_variant_over<pointer_value_types>::type pointer_value_variant;
+typedef boost::make_variant_over<pointer_optional_types>::type pointer_optional_variant;
+typedef boost::make_variant_over<pointer_null_types>::type pointer_null_variant;
+
+typedef boost::variant<pointer_value_variant, pointer_optional_variant, pointer_null_variant> combined_pointer_variant;
+
+class static_param
+{
+public:
+ template <typename ParamT>
+ static_param(ParamT & p) : v(pointer_value_variant(&p)) {}
+
+ template <typename ParamT>
+ static_param(boost::optional<ParamT> & p) : v(pointer_optional_variant(&p)) {}
+
+ template <typename ParamT>
+ static_param(null_value<ParamT> & p) : v(pointer_null_variant(&p)) {}
+
+ template <typename ParamBinderT>
+ void bind_param(int n, ParamBinderT & pb)
+ {
+ variant_visitor<ParamBinderT> vv(n, pb);
+ boost::apply_visitor(vv, v);
+ }
+
+private:
+ template <typename ParamBinderT>
+ struct variant_visitor : public boost::static_visitor<>
+ {
+ template <typename VariantT>
+ struct binder_visitor : public boost::static_visitor<>
+ {
+ binder_visitor(int n, ParamBinderT * pb) : num(n), binder(pb) {}
+
+ template <typename ElementT>
+ void operator() (ElementT e)
+ {
+ binder->bind_param(num, *e);
+ }
+
+ int num;
+ ParamBinderT * binder;
+ };
+
+ variant_visitor(int n, ParamBinderT & pb) : num(n), binder(&pb) {}
+
+ template <typename VariantT>
+ void operator() (VariantT & v)
+ {
+ binder_visitor<VariantT> bv(num, binder);
+ boost::apply_visitor(bv, v);
+ }
+
+ int num;
+ ParamBinderT * binder;
+ };
+
+ combined_pointer_variant v;
+};
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_STATIC_PARAM_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/static_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/static_value.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,162 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_STATIC_VALUE_HPP)
+#define BOOST_SQL_CLI_DETAIL_STATIC_VALUE_HPP
+
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/next_prior.hpp>
+#include <boost/variant/apply_visitor.hpp>
+#include <boost/variant/get.hpp>
+#include <boost/variant/variant.hpp>
+
+#include <boost/sql_cli/detail/value_types.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+
+typedef boost::make_variant_over<value_types>::type value_variant;
+typedef boost::make_variant_over<optional_types>::type optional_variant;
+typedef boost::make_variant_over<null_types>::type null_variant;
+
+typedef boost::variant<value_variant, optional_variant, null_variant> combined_value_variant;
+
+class static_value
+{
+public:
+ enum type_style { plain_v, optional_v, null_v };
+
+ static_value(int ti, type_style s) : type_idx(ti), style(s) {}
+
+ template <typename FieldT>
+ void set_value(FieldT & f)
+ {
+ value_setter<0, boost::mpl::begin<value_types>::type>()(f, *this, type_idx, style);
+ }
+
+ template <typename ValueT>
+ operator ValueT() const
+ {
+ return boost::apply_visitor(value_visitor<ValueT>(), var);
+ }
+
+private:
+ template <typename ValueT>
+ struct value_visitor : public boost::static_visitor<ValueT>
+ {
+ template <typename VariantT>
+ ValueT operator() (VariantT const & v) const
+ {
+ return boost::get<ValueT>(v);
+ }
+ };
+
+ template <int IndexV, typename IterT>
+ struct value_setter
+ {
+ template <typename FieldT>
+ void operator() (FieldT & f, static_value & sv, int ti, type_style s)
+ {
+ using namespace boost::mpl;
+ if ( ti == IndexV )
+ {
+ switch(s)
+ {
+ case plain_v:
+ sv.set(f.template get<typename deref<IterT>::type>());
+ break;
+ case optional_v:
+ sv.set(f.template get<boost::optional<typename deref<IterT>::type> >());
+ break;
+ case null_v:
+ sv.set(f.template get<null_value<typename deref<IterT>::type> >());
+ }
+ }
+ else
+ value_setter<IndexV+1, typename next<IterT>::type>()(f, sv, ti, s);
+ }
+ };
+
+ template <int IndexV>
+ struct value_setter<IndexV, boost::mpl::end<value_types>::type>
+ {
+ template <typename FieldT>
+ void operator() (FieldT &, static_value &, int, type_style)
+ {
+ assert(!"Invalid type");
+ }
+ };
+
+ template <typename ValueT>
+ void set(ValueT const & v)
+ {
+ var = value_variant(v);
+ }
+
+ template <typename ValueT>
+ void set(boost::optional<ValueT> const & v)
+ {
+ var = optional_variant(v);
+ }
+
+ template <typename ValueT>
+ void set(null_value<ValueT> const & v)
+ {
+ var = null_variant(v);
+ }
+
+ combined_value_variant var;
+ int type_idx;
+ type_style style;
+};
+
+template <typename ValueT>
+struct static_value_style
+{
+ typedef ValueT type;
+
+ static const static_value::type_style value = static_value::plain_v;
+};
+
+template <typename ValueT>
+struct static_value_style<boost::optional<ValueT> >
+{
+ typedef ValueT type;
+
+ static const static_value::type_style value = static_value::optional_v;
+};
+
+template <typename ValueT>
+struct static_value_style<null_value<ValueT> >
+{
+ typedef ValueT type;
+
+ static const static_value::type_style value = static_value::null_v;
+};
+
+template <typename ValueT>
+static_value make_static_value()
+{
+ using namespace boost::mpl;
+ return static_value(distance<begin<value_types>::type,
+ typename find<value_types, typename static_value_style<ValueT>::type>::type>::value,
+ static_value_style<ValueT>::value);
+}
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_STATIC_VALUE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/detail/value_types.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/detail/value_types.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,53 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_DETAIL_VALUE_TYPES_HPP)
+#define BOOST_SQL_CLI_DETAIL_VALUE_TYPES_HPP
+
+#include <string>
+
+#include <boost/mpl/transform.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/optional.hpp>
+
+#include <boost/sql_cli/null_value.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+
+typedef boost::mpl::vector <
+ signed char, unsigned char,
+ short, unsigned short,
+ long, unsigned long,
+ long long, unsigned long long,
+ float, double,
+ std::string, std::wstring> value_types;
+
+template <template <typename> class TemplateT>
+struct add_template
+{
+ template <typename T>
+ struct apply
+ {
+ typedef TemplateT<T> type;
+ };
+};
+
+typedef boost::mpl::transform<value_types, add_template<boost::optional> >::type optional_types;
+typedef boost::mpl::transform<value_types, add_template<null_value> >::type null_types;
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_DETAIL_VALUE_TYPES_HPP)

Added: sandbox/sql_cli/boost/sql_cli/error.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/error.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,52 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ERROR_HPP)
+#define BOOST_SQL_CLI_ERROR_HPP
+
+#include <string>
+#include <stdexcept>
+
+namespace boost
+{
+namespace sql_cli
+{
+
+//! @class error error.hpp boost/sql_cli/error.hpp
+//! Exception class that represents a generic SqlCli error.
+
+class error : public std::runtime_error
+{
+public:
+ //! @name Constructors
+ //@{
+ //! @brief The 'msg' string will be returned by the what() member
+ //! function, possibly augmented with internal information.
+ error(std::string const & msg) :
+ std::runtime_error("Boost.SqlCli error: " + msg) {}
+ //@}
+};
+
+//! @class null_data error.hpp boost/sql_cli/error.hpp
+//! Exception class that represents a generic SqlCli error.
+//! Represents null values in context where they should not be ignored.
+//! This may be thrown when retrieving a null value in an object that is not
+//! suitable to represent it (i.e. it is neither a boost::optional<> nor a
+//! sql_cli::null_value<>).
+
+class null_data : public error
+{
+public:
+ null_data() : error("Null data") {}
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ERROR_HPP)

Added: sandbox/sql_cli/boost/sql_cli/field.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/field.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,53 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_FIELD_HPP)
+#define BOOST_SQL_CLI_FIELD_HPP
+
+#include <boost/shared_ptr.hpp>
+
+#include <boost/sql_cli/detail/field_base.hpp>
+#include <boost/sql_cli/detail/static_value.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+class row;
+
+//! @class field field.hpp boost/sql_cli/field.hpp
+//! Represents a %field in a %row of a statement's result set.
+
+class field
+{
+public:
+ //! Returns the field's value.
+ template <typename ValueT>
+ ValueT get() const
+ {
+ detail::static_value sv = detail::make_static_value<ValueT>();
+ fd->get(sv);
+ return sv;
+ }
+
+ //! Returns the field's number.
+ int number() const { return fd->number(); }
+
+private:
+ friend class row;
+
+ field(boost::shared_ptr<detail::field_base> const & f) : fd(f) {}
+
+ boost::shared_ptr<detail::field_base> fd;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_FIELD_HPP)

Added: sandbox/sql_cli/boost/sql_cli/null_value.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/null_value.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,31 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_NULL_VALUE_HPP)
+#define BOOST_SQL_CLI_NULL_VALUE_HPP
+
+namespace boost
+{
+namespace sql_cli
+{
+
+//! @class null_value null_value.hpp boost/sql_cli/null_value.hpp
+//! Represents a typed null value.
+//! It is typically used for input parameters that are always null.
+
+template <typename ValueT>
+struct null_value
+{
+ typedef ValueT type;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_NULL_VALUE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_column.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_column.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,53 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_COLUMN_HPP)
+#define BOOST_SQL_CLI_ODBC_COLUMN_HPP
+
+#include <string>
+#include <typeinfo>
+
+#include <boost/sql_cli/detail/column_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class column : public sql_cli::detail::column_base
+{
+public:
+ column(std::string const & nm, int t, int s, int p, bool nl, int no) :
+ nam(nm), typ(t), siz(s), prec(p), null(nl), num(no)
+ {
+ }
+
+ std::string name() const { return nam; }
+ std::type_info const & type() const;
+ int size() const { return siz; }
+ int precision() const { return prec; }
+ bool nullable() const { return null; }
+ int number() const { return num; }
+
+private:
+ std::string nam;
+ int typ;
+ int siz;
+ int prec;
+ bool null;
+ int num;
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_COLUMN_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_config.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_config.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,17 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_CONFIG_HPP)
+#define BOOST_SQL_CLI_ODBC_CONFIG_HPP
+
+#include <windows.h>
+#include <sql.h>
+#include <sqlext.h>
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_CONFIG_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_connection.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_connection.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,78 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_CONNECTION_HPP)
+#define BOOST_SQL_CLI_ODBC_CONNECTION_HPP
+
+#include <memory>
+#include <string>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/signal.hpp>
+#include <boost/signals/connection.hpp>
+#include <boost/weak_ptr.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <boost/sql_cli/detail/connection_base.hpp>
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/odbc_handle.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+class statement_base;
+} // namespace detail
+
+namespace odbc
+{
+class environment;
+
+class connection : public boost::sql_cli::detail::connection_base,
+ public handle<SQLHDBC, SQL_HANDLE_DBC>
+{
+public:
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ typedef boost::signal0<void> on_disconnect_t;
+#else
+ typedef boost::signal<void()> on_disconnect_t;
+#endif
+
+ connection();
+ ~connection();
+
+ void connect(std::string const & srv, std::string const & user,
+ std::string const & auth);
+ void disconnect();
+
+ boost::signals::connection on_disconnect (
+ on_disconnect_t::slot_type const & s)
+ {
+ return disc_sig.connect(s);
+ }
+
+ void commit();
+ void rollback();
+
+private:
+ std::auto_ptr<boost::sql_cli::detail::statement_base> create_statement();
+
+ boost::shared_ptr<environment> my_env;
+ static boost::weak_ptr<environment> the_env;
+
+ on_disconnect_t disc_sig;
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_CONNECTION_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_environment.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_environment.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,34 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_ENVIRONMENT_HPP)
+#define BOOST_SQL_CLI_ODBC_ENVIRONMENT_HPP
+
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/odbc_handle.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class environment : public handle<SQLHENV, SQL_HANDLE_ENV>
+{
+public:
+ environment();
+ ~environment();
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_ENVIRONMENT_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_error.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_error.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,43 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_ERROR_HPP)
+#define BOOST_SQL_CLI_ODBC_ERROR_HPP
+
+#include <boost/sql_cli/error.hpp>
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class error : public sql_cli::error
+{
+public:
+ template <typename SourceT>
+ error(SourceT const & s, SQLRETURN r) :
+ sql_cli::error("ODBC error: " + s.error_msg(r))
+ {
+ }
+
+ error(std::string const & msg) :
+ sql_cli::error("ODBC error: " + msg)
+ {
+ }
+
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_ERROR_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_field.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_field.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,95 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_FIELD_HPP)
+#define BOOST_SQL_CLI_ODBC_FIELD_HPP
+
+#include <memory>
+
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/traits.hpp>
+#include <boost/sql_cli/odbc/value_buffer.hpp>
+#include <boost/sql_cli/odbc/odbc_column.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+#include <boost/sql_cli/odbc/odbc_statement.hpp>
+#include <boost/sql_cli/detail/field_base.hpp>
+#include <boost/sql_cli/detail/static_value.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class field : public sql_cli::detail::field_base
+{
+public:
+ field(statement const & s, boost::shared_ptr<column> const & c) :
+ stmt(&s), col(c), trunc(false)
+ {
+ }
+
+ int number() const { return col->number(); }
+ std::string name() const { return col->name(); }
+
+ template <typename ValueT>
+ ValueT get() const;
+
+ bool truncated() const { return trunc; }
+
+private:
+ void get(detail::static_value & sv) const
+ {
+ sv.set_value(*this);
+ }
+
+ statement const * stmt;
+ boost::shared_ptr<column> col;
+ mutable bool trunc;
+};
+
+
+// Null values are either retrieved by means of a Boost.Optional or result in a
+// sql_cli::null_value exception being thrown.
+// Currently data should never be truncated because strings are retrieved as
+// properly sized std::vector<char>, although it may happen due to platform
+// limits.
+// TODO: Cache the value; a subsequent call to SQLGetData will return
+// SQL_NO_DATA
+
+template <typename ValueT>
+ValueT field::get() const
+{
+ typedef traits<ValueT> traits_type;
+
+ stmt->conn_check();
+ value_buffer<ValueT> v(col.get());
+ SQLINTEGER soi;
+
+ SQLRETURN ret = SQLGetData(stmt->get_handle(),
+ static_cast<SQLUSMALLINT>(col->number()),
+ traits_type::value_type_id, v, v.size(), &soi);
+
+ state code = stmt->check_return(ret);
+ if ( ret == SQL_SUCCESS_WITH_INFO )
+ {
+ trunc = sql_cli::odbc::string_truncated(code) ||
+ sql_cli::odbc::fraction_truncated(code);
+ }
+ if ( soi == SQL_NULL_DATA )
+ v.null();
+ return v;
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_FIELD_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_handle.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_handle.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,137 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_HANDLE_HPP)
+#define BOOST_SQL_CLI_ODBC_HANDLE_HPP
+
+#include <string>
+#include <sstream>
+#include <vector>
+
+#include <boost/noncopyable.hpp>
+
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+#include <boost/sql_cli/odbc/odbc_state.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+// TODO: Consider providing single diagnostic values by using SQLGetDiagField
+// instead of SQLGetDiagRec
+template <typename TypeT, SQLSMALLINT KindV>
+class handle : private boost::noncopyable
+{
+public:
+ typedef TypeT type;
+
+ static SQLSMALLINT const kind = KindV;
+
+ type get_handle() const { return hn; }
+ type & get_handle() { return hn; }
+
+ std::string error_msg(SQLRETURN r) const;
+ state error_code() const;
+ state check_return(SQLRETURN ret, std::string * msg = 0) const;
+
+private:
+ struct diag_rec
+ {
+ diag_rec() : msg(81), len(0) {}
+
+ state code;
+ SQLINTEGER err;
+ std::vector<SQLCHAR> msg;
+ SQLSMALLINT len;
+ };
+
+ SQLRETURN update_diag() const;
+
+ type hn;
+ mutable diag_rec current_diag;
+};
+
+// Does not throw because it may be used in order to set up an exception object
+
+template <typename TypeT, SQLSMALLINT KindV>
+SQLRETURN handle<TypeT, KindV>::update_diag() const
+{
+ // TODO: Loop over the available diagnostic records
+ SQLRETURN ret = SQLGetDiagRec(kind, hn, static_cast<SQLSMALLINT>(1),
+ current_diag.code, &current_diag.err, &current_diag.msg[0],
+ static_cast<SQLSMALLINT>(current_diag.msg.size()),
+ &current_diag.len);
+ if ( ret == SQL_SUCCESS_WITH_INFO &&
+ static_cast<SQLSMALLINT>(current_diag.msg.size()) <
+ current_diag.len + 1 )
+ {
+ current_diag.msg.resize(current_diag.len + 1);
+ ret = SQLGetDiagRec(kind, hn, static_cast<SQLSMALLINT>(1),
+ current_diag.code, &current_diag.err, &current_diag.msg[0],
+ static_cast<SQLSMALLINT>(current_diag.msg.size()),
+ &current_diag.len);
+ }
+ return ret;
+}
+
+template <typename TypeT, SQLSMALLINT KindV>
+std::string handle<TypeT, KindV>::error_msg(SQLRETURN r) const
+{
+ if ( r == SQL_INVALID_HANDLE )
+ return "Invalid handle";
+
+ SQLRETURN ret = update_diag();
+ if ( ret == SQL_SUCCESS )
+ {
+ std::ostringstream s;
+ // TODO: Correct the static_cast
+ s << '[' << static_cast<SQLCHAR *>(current_diag.code) << ']' << " " << &current_diag.msg[0] <<
+ " (" << current_diag.err << ')';
+ return s.str();
+ }
+ else
+ return "Unknown problem";
+}
+
+template <typename TypeT, SQLSMALLINT KindV>
+state handle<TypeT, KindV>::error_code() const
+{
+ if ( update_diag() != SQL_SUCCESS )
+ throw error("Invalid diagnostic record");
+ return current_diag.code;
+}
+
+template <typename TypeT, SQLSMALLINT KindV>
+state handle<TypeT, KindV>::check_return(SQLRETURN ret, std::string * msg) const
+{
+ if ( ret != SQL_SUCCESS && ret == SQL_SUCCESS_WITH_INFO )
+ {
+ if ( msg != 0 )
+ throw error(*msg);
+ else
+ throw error(*this, ret);
+ }
+ state st;
+ if ( ret == SQL_SUCCESS_WITH_INFO )
+ {
+ st = error_code();
+ // TODO: Handle warnings
+ }
+ return st;
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_HANDLE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_param.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_param.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,277 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_PARAM_HPP)
+#define BOOST_SQL_CLI_ODBC_PARAM_HPP
+
+#include <boost/optional.hpp>
+#include <boost/none.hpp>
+
+#include <boost/sql_cli/null_value.hpp>
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/traits.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class param
+{
+public:
+ param(unsigned short n, SQLINTEGER s) : num(n), soi(s) {}
+ virtual ~param() {}
+
+ unsigned short number() const { return num; }
+
+ virtual SQLPOINTER parameter_value_ptr() const = 0;
+
+ virtual SQLSMALLINT value_type_id() const = 0;
+ virtual SQLSMALLINT param_type_id() const = 0;
+
+ SQLINTEGER * strlen_or_indptr() { return &soi; }
+
+ virtual bool update() = 0;
+
+protected:
+ void strlen_or_indptr(SQLINTEGER s) { soi = s; }
+
+private:
+ unsigned short num;
+ SQLINTEGER soi;
+};
+
+template <typename ValueT>
+class param_value
+{
+public:
+ typedef ValueT value_type;
+
+ param_value(value_type & v) : val(v) {}
+
+ SQLPOINTER ptr() const { return (SQLPOINTER)(&val); }
+
+ bool update() { return false; }
+
+ SQLINTEGER size() const { return traits<value_type>::strlen_or_indptr; }
+
+private:
+ value_type & val;
+};
+
+template <>
+class param_value<std::string>
+{
+public:
+ typedef std::string value_type;
+
+ param_value(value_type & v) : val(v), buf(v.begin(), v.end())
+ {
+ buf.push_back('\0');
+ }
+
+ SQLPOINTER ptr() const { return (SQLPOINTER)(&buf[0]); }
+
+ bool update()
+ {
+ buf.assign(val.begin(), val.end());
+ buf.push_back('\0');
+ return true;
+ }
+
+ SQLINTEGER size() const { return traits<value_type>::strlen_or_indptr; }
+
+private:
+ value_type & val;
+ std::vector<char> buf;
+};
+
+template <>
+class param_value<std::wstring>
+{
+public:
+ typedef std::wstring value_type;
+
+ param_value(value_type & v) : val(v), buf(v.begin(), v.end())
+ {
+ buf.push_back(L'\0');
+ }
+
+ SQLPOINTER ptr() const { return (SQLPOINTER)(&buf[0]); }
+
+ bool update()
+ {
+ buf.assign(val.begin(), val.end());
+ buf.push_back(L'\0');
+ return true;
+ }
+
+ SQLINTEGER size() const { return traits<value_type>::strlen_or_indptr; }
+
+private:
+ value_type & val;
+ std::vector<wchar_t> buf;
+};
+
+template <typename ValueT>
+class param_value<sql_cli::null_value<ValueT> >
+{
+public:
+ typedef sql_cli::null_value<ValueT> value_type;
+
+ param_value(value_type &) {}
+
+ SQLPOINTER ptr() const { return (SQLPOINTER)0; }
+
+ bool update() { return true; }
+
+ SQLINTEGER size() const { return SQL_NULL_DATA; }
+};
+
+template <typename ValueT>
+struct param_value<boost::optional<ValueT> >
+{
+public:
+ typedef boost::optional<ValueT> value_type;
+
+ param_value(value_type & v) : val(v) {}
+
+// SQLPOINTER ptr() const { return (SQLPOINTER)(val ? val.get_ptr() : 0); }
+ SQLPOINTER ptr() const { return (SQLPOINTER)(val.get_ptr()); }
+
+ bool update() { return true; }
+
+ SQLINTEGER size() const
+ {
+ return val ? traits<value_type>::strlen_or_indptr : SQL_NULL_DATA;
+ }
+
+private:
+ value_type & val;
+};
+
+template <>
+struct param_value<boost::optional<std::string> >
+{
+public:
+ typedef boost::optional<std::string> value_type;
+
+ param_value(value_type & v) : val(v)
+ {
+ if ( val )
+ {
+ buf.assign(val->begin(), val->end());
+ buf.push_back('\0');
+ }
+ }
+
+ SQLPOINTER ptr() const
+ {
+ return (SQLPOINTER)(val ? &buf[0] : 0);
+ }
+
+ bool update()
+ {
+ if ( val )
+ {
+ buf.assign(val->begin(), val->end());
+ buf.push_back('\0');
+ }
+ return true;
+ }
+
+ SQLINTEGER size() const
+ {
+ return val ? traits<value_type>::strlen_or_indptr : SQL_NULL_DATA;
+ }
+
+private:
+ value_type & val;
+ std::vector<char> buf;
+};
+
+template <>
+struct param_value<boost::optional<std::wstring> >
+{
+public:
+ typedef boost::optional<std::wstring> value_type;
+
+ param_value(value_type & v) : val(v)
+ {
+ if ( val )
+ {
+ buf.assign(val->begin(), val->end());
+ buf.push_back(L'\0');
+ }
+ }
+
+ SQLPOINTER ptr() const
+ {
+ return (SQLPOINTER)(val ? &buf[0] : 0);
+ }
+
+ bool update()
+ {
+ if ( val )
+ {
+ buf.assign(val->begin(), val->end());
+ buf.push_back(L'\0');
+ }
+ return true;
+ }
+
+ SQLINTEGER size() const
+ {
+ return val ? traits<value_type>::strlen_or_indptr : SQL_NULL_DATA;
+ }
+
+private:
+ value_type & val;
+ std::vector<wchar_t> buf;
+};
+
+template <typename ValueT>
+class typed_param : public param
+{
+public:
+ typedef ValueT value_type;
+ typedef traits<value_type> traits_type;
+
+ typed_param(ValueT & v, unsigned short n) : val(v),
+ param(n, traits_type::strlen_or_indptr)
+ {
+ }
+
+ SQLSMALLINT value_type_id() const { return traits_type::value_type_id; }
+ SQLSMALLINT param_type_id() const { return traits_type::param_type_id; }
+
+ SQLPOINTER parameter_value_ptr() const { return val.ptr(); }
+
+ bool update()
+ {
+ bool ret = val.update();
+ if ( ret )
+ strlen_or_indptr(val.size());
+ return ret;
+ }
+
+protected:
+ param_value<ValueT> val;
+
+private:
+ typed_param & operator=(typed_param const &);
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_PARAM_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_result_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_result_set.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,83 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_RESULT_SET_HPP)
+#define BOOST_SQL_CLI_ODBC_RESULT_SET_HPP
+
+#include <memory>
+#include <vector>
+
+#include <boost/shared_ptr.hpp>
+
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/odbc_column.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+#include <boost/sql_cli/detail/result_set_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+class row_base;
+} // namespace detail
+
+namespace odbc
+{
+class statement;
+
+class result_set : public sql_cli::detail::result_set_base
+{
+public:
+ result_set(statement const & s);
+
+ statement const & get_statement() const { return stmt; }
+
+ int column_count() const { return num_col; }
+
+ boost::shared_ptr<column> get_odbc_column(int i)
+ {
+ if ( i < 0 || i >= num_col )
+ throw error("column index out of range");
+ return cols[i];
+ }
+
+ boost::shared_ptr<detail::column_base> get_column(int i)
+ {
+ return get_odbc_column(i);
+ }
+
+ boost::shared_ptr<detail::column_base> get_column(std::string const & n)
+ {
+ for ( int i = 0; i < num_col; ++i )
+ {
+ if ( cols[i]->name() == n )
+ return cols[i];
+ }
+ throw error(n + ": inexistent column");
+ }
+
+ std::auto_ptr<detail::row_base> create_row();
+
+private:
+ boost::shared_ptr<column> create_column(int n);
+
+ result_set & operator= (result_set const &);
+
+ statement const & stmt;
+ SQLSMALLINT num_col;
+ std::vector<boost::shared_ptr<column> > cols;
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_RESULT_SET_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_row.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_row.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,68 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_ROW_HPP)
+#define BOOST_SQL_CLI_ODBC_ROW_HPP
+
+#include <boost/shared_ptr.hpp>
+
+#include <boost/sql_cli/odbc/odbc_field.hpp>
+#include <boost/sql_cli/odbc/odbc_result_set.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+#include <boost/sql_cli/detail/row_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class row : public sql_cli::detail::row_base
+{
+public:
+ row(result_set & rs) : res(rs)
+ {
+ for ( int i = 0; i < res.column_count(); ++i )
+ {
+ boost::shared_ptr<field> f(new field(res.get_statement(),
+ res.get_odbc_column(i)));
+ fields.push_back(f);
+ }
+ }
+
+ boost::shared_ptr<sql_cli::detail::field_base> get_field(int i)
+ {
+ if ( i < 0 || i >= res.column_count() )
+ throw error("field index out of range");
+ return fields[i];
+ }
+
+ boost::shared_ptr<sql_cli::detail::field_base> get_field(std::string const & n)
+ {
+ for ( int i = 0; i < res.column_count(); ++i )
+ {
+ if ( fields[i]->name() == n )
+ return fields[i];
+ }
+ throw error(n + ": inexistent field");
+ }
+
+private:
+ row & operator= (row const &);
+
+ result_set & res;
+ std::vector<boost::shared_ptr<field> > fields;
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_ROW_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_state.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_state.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,58 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_STATE_HPP)
+#define BOOST_SQL_CLI_ODBC_STATE_HPP
+
+#include <algorithm>
+
+#include <boost/array.hpp>
+#include <boost/operators.hpp>
+
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+class state :
+ public equality_comparable<state, less_than_comparable<state> >
+{
+ typedef boost::array<SQLCHAR, SQL_SQLSTATE_SIZE> state::* safe_bool_type;
+
+public:
+ state() { data[0] = '\0'; }
+
+ explicit state(const char (&d)[SQL_SQLSTATE_SIZE + 1])
+ {
+ std::copy(d, d + SQL_SQLSTATE_SIZE, data.begin());
+ }
+
+ operator SQLCHAR * () { return data.c_array(); }
+
+ operator safe_bool_type() { return data[0] == '\0' ? &state::data : 0; }
+
+ bool operator== (state const & rhs) const { return data == rhs.data; }
+ bool operator< (state const & rhs) const { return data < rhs.data; }
+
+private:
+ boost::array<SQLCHAR, SQL_SQLSTATE_SIZE> data;
+
+};
+
+bool string_truncated(state const & s);
+bool fraction_truncated(state const & s);
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_STATE_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/odbc_statement.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/odbc_statement.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,90 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_STATEMENT_HPP)
+#define BOOST_SQL_CLI_ODBC_STATEMENT_HPP
+
+#include <memory>
+#include <string>
+#include <vector>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+#include <boost/numeric/conversion/cast.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/signals/connection.hpp>
+
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/odbc_handle.hpp>
+#include <boost/sql_cli/odbc/odbc_param.hpp>
+#include <boost/sql_cli/odbc/traits.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+#include <boost/sql_cli/detail/statement_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+class result_set_base;
+} // namespace detail
+
+namespace odbc
+{
+class connection;
+
+class statement : public sql_cli::detail::statement_base,
+ public handle<SQLHSTMT, SQL_HANDLE_STMT>
+{
+public:
+ statement(connection & c);
+ ~statement();
+
+ void conn_check() const;
+
+ void prepare(std::string const & s);
+ void exec();
+ void exec(std::string const & s);
+
+ int param_count() const;
+ template <typename ValueT>
+ void bind_param(int n, ValueT & v);
+
+private:
+ typedef std::vector<boost::shared_ptr<param> > params_type;
+
+ void disconnect() { connected = false; }
+
+ std::auto_ptr<sql_cli::detail::result_set_base> create_result_set() const;
+
+ void bind_param(int n, detail::static_param sp) { sp.bind_param(n, *this); }
+
+ void do_bind_param(boost::shared_ptr<param> const & par);
+
+ boost::signals::scoped_connection disc_slot;
+ bool connected;
+
+ params_type params;
+};
+
+template <typename ValueT>
+void statement::bind_param(int n, ValueT & v)
+{
+ unsigned short usn = boost::numeric_cast<unsigned short>(n);
+ boost::shared_ptr<param> p(new typed_param<ValueT>(v, usn));
+ params[n-1] = p;
+ do_bind_param(p);
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_STATEMENT_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/traits.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/traits.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,116 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_TRAITS_HPP)
+#define BOOST_SQL_CLI_ODBC_TRAITS_HPP
+
+#include <string>
+
+#include <boost/optional.hpp>
+
+#include <boost/sql_cli/null_value.hpp>
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+template <SQLSMALLINT valueTypeId, SQLSMALLINT paramTypeId,
+ SQLINTEGER strlenOrIndptr>
+struct traits_base
+{
+ static SQLSMALLINT const value_type_id = valueTypeId;
+ static SQLSMALLINT const param_type_id = paramTypeId;
+ static SQLINTEGER const strlen_or_indptr = strlenOrIndptr;
+};
+
+template <typename ValueT>
+struct traits : traits_base<0, 0, 0>
+{
+};
+
+template <>
+struct traits<signed char> : traits_base<SQL_C_STINYINT, SQL_TINYINT, SQL_NTS>
+{
+};
+
+template <>
+struct traits<unsigned char> : traits_base<SQL_C_UTINYINT, SQL_TINYINT, SQL_NTS>
+{
+};
+
+template <>
+struct traits<short> : traits_base<SQL_C_SSHORT, SQL_SMALLINT, SQL_NTS>
+{
+};
+
+template <>
+struct traits<unsigned short> : traits_base<SQL_C_USHORT, SQL_SMALLINT, SQL_NTS>
+{
+};
+
+template <>
+struct traits<long> : traits_base<SQL_C_SLONG, SQL_INTEGER, SQL_NTS>
+{
+};
+
+template <>
+struct traits<unsigned long> : traits_base<SQL_C_ULONG, SQL_INTEGER, SQL_NTS>
+{
+};
+
+template <>
+struct traits<long long> : traits_base<SQL_C_SBIGINT, SQL_BIGINT, SQL_NTS>
+{
+};
+
+template <>
+struct traits<unsigned long long> :
+ traits_base<SQL_C_UBIGINT, SQL_BIGINT, SQL_NTS>
+{
+};
+
+template <>
+struct traits<float> : traits_base<SQL_C_FLOAT, SQL_REAL, SQL_NTS>
+{
+};
+
+template <>
+struct traits<double> : traits_base<SQL_C_DOUBLE, SQL_DOUBLE, SQL_NTS>
+{
+};
+
+template <>
+struct traits<std::string> : traits_base<SQL_C_CHAR, SQL_VARCHAR, SQL_NTS>
+{
+};
+
+template <>
+struct traits<std::wstring> : traits_base<SQL_C_WCHAR, SQL_WVARCHAR, SQL_NTS>
+{
+};
+
+template <typename ValueT>
+struct traits<sql_cli::null_value<ValueT> > : traits<ValueT>
+{
+};
+
+template <typename ValueT>
+struct traits<boost::optional<ValueT> > : traits<ValueT>
+{
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_TRAITS_HPP)

Added: sandbox/sql_cli/boost/sql_cli/odbc/value_buffer.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/odbc/value_buffer.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,130 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ODBC_VALUE_BUFFER_HPP)
+#define BOOST_SQL_CLI_ODBC_VALUE_BUFFER_HPP
+
+#include <string>
+#include <vector>
+
+#include <boost/none.hpp>
+#include <boost/optional.hpp>
+
+#include <boost/sql_cli/error.hpp>
+#include <boost/sql_cli/odbc/odbc_config.hpp>
+#include <boost/sql_cli/odbc/odbc_column.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+template <typename ValueT>
+class value_buffer_base
+{
+public:
+ operator SQLPOINTER() { return (SQLPOINTER)(&val); }
+ SQLUINTEGER size() const { return sizeof(ValueT); }
+
+protected:
+ value_buffer_base(column const * = 0) {}
+
+ const ValueT & get() const { return val; }
+
+private:
+ ValueT val;
+};
+
+template <>
+class value_buffer_base<std::string>
+{
+public:
+ operator SQLPOINTER() { return (SQLPOINTER)(&vec[0]); }
+ SQLUINTEGER size() const { return static_cast<SQLUINTEGER>(vec.size()); }
+
+protected:
+ value_buffer_base(column const * c) : vec(c->size()) {}
+
+ std::string get() const { return std::string(&vec[0]); }
+
+private:
+ std::vector<char> vec;
+};
+
+template <>
+class value_buffer_base<std::wstring>
+{
+public:
+ operator SQLPOINTER() { return (SQLPOINTER)(&vec[0]); }
+ SQLUINTEGER size() const { return static_cast<SQLUINTEGER>(vec.size()); }
+
+protected:
+ value_buffer_base(column const * c) : vec(c->size()) {}
+
+ std::wstring get() const { return std::wstring(&vec[0]); }
+
+private:
+ std::vector<wchar_t> vec;
+};
+
+template <typename ValueT>
+class null_value_buffer : public value_buffer_base<ValueT>
+{
+public:
+ null_value_buffer(column const * c = 0) :
+ value_buffer_base<ValueT>(c), is_null(false)
+ {
+ }
+
+ void null() { is_null = true; }
+
+protected:
+ bool is_null;
+};
+
+template <typename ValueT>
+class value_buffer : public null_value_buffer<ValueT>
+{
+public:
+ value_buffer(column const * c = 0) :
+ null_value_buffer<ValueT>(c)
+ {
+ }
+
+ operator ValueT()
+ {
+ if ( this->is_null )
+ throw null_data();
+ return this->get();
+ }
+};
+
+template <typename ValueT>
+class value_buffer<boost::optional<ValueT> > : public null_value_buffer<ValueT>
+{
+public:
+ value_buffer(column const * c = 0) :
+ null_value_buffer<ValueT>(c)
+ {
+ }
+
+ operator boost::optional<ValueT>()
+ {
+ return this->is_null ? boost::optional<ValueT>() :
+ boost::optional<ValueT>(this->get());
+ }
+};
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ODBC_VALUE_BUFFER_HPP)

Added: sandbox/sql_cli/boost/sql_cli/result_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/result_set.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,79 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_RESULT_SET_HPP)
+#define BOOST_SQL_CLI_RESULT_SET_HPP
+
+#include <string>
+
+#include <boost/scoped_ptr.hpp>
+
+#include <boost/sql_cli/column.hpp>
+#include <boost/sql_cli/error.hpp>
+#include <boost/sql_cli/statement.hpp>
+#include <boost/sql_cli/detail/result_set_base.hpp>
+#include <boost/sql_cli/detail/result_set_iterator.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+
+//! @class result_set result_set.hpp boost/sql_cli/result_set.hpp
+//! @brief Represents the results of a query that returns data and provides
+//! means to iterate over both the data and a description of its
+//! structure.
+
+class result_set
+{
+public:
+ typedef detail::result_set_iterator iterator;
+
+ //! @name Constructors
+ //@{
+ //! Associates a new result_set with statement 's'.
+ result_set(statement & s) : res(s.create_result_set()) {}
+ //@}
+
+ //! @name Result set description
+ //@{
+ //! Returns the number of columns returned by the last query executed by
+ //! the associated statement.
+ int column_count() const { return res->column_count(); }
+
+ //! Returns a description of the 'i'-th %column in the result set.
+ column operator[](int i) const
+ {
+ return res->get_column(i);
+ }
+
+ //! Returns a description of the %column named 'n' in the result set.
+ column operator[](std::string const & n) const
+ {
+ return res->get_column(n);
+ }
+ //@}
+
+ //! @name Iteration over the returned rows
+ //@{
+ //! \brief Returns an iterator to the first row in the result set.
+ //! Dereferencing an iterator yields an instance of the row class.
+ iterator begin() const { return iterator(res.get()); }
+ //! Returns an iterator to one past the last row in the result set.
+ iterator end() const { return iterator(); }
+ //@}
+
+private:
+ boost::scoped_ptr<detail::result_set_base> res;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_RESULT_SET_HPP)

Added: sandbox/sql_cli/boost/sql_cli/row.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/row.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,57 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_ROW_HPP)
+#define BOOST_SQL_CLI_ROW_HPP
+
+#include <memory>
+
+#include <boost/scoped_ptr.hpp>
+
+#include <boost/sql_cli/field.hpp>
+#include <boost/sql_cli/detail/row_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+class result_set_iterator;
+} // namespace detail
+
+//! @class row row.hpp boost/sql_cli/row.hpp
+//! Allows iteration over the fields in a result set's %row.
+
+class row
+{
+public:
+ //! @name Field iteration
+ //@{
+ //! Returns the 'i'-th field.
+ field operator[] (int i) const { return field(rw->get_field(i)); }
+ //! Returns the field named 'n'.
+ field operator[] (std::string const & n) const
+ {
+ return field(rw->get_field(n));
+ }
+ //@}
+
+private:
+ friend class detail::result_set_iterator;
+
+ row(std::auto_ptr<detail::row_base> rb) : rw(rb) {}
+
+ boost::scoped_ptr<detail::row_base> rw;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_ROW_HPP)

Added: sandbox/sql_cli/boost/sql_cli/statement.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/boost/sql_cli/statement.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,174 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_STATEMENT_HPP)
+#define BOOST_SQL_CLI_STATEMENT_HPP
+
+#include <string>
+
+#include <boost/scoped_ptr.hpp>
+
+#include <boost/sql_cli/connection.hpp>
+#include <boost/sql_cli/detail/result_set_base.hpp>
+#include <boost/sql_cli/detail/statement_base.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+class result_set;
+
+//! @class statement statement.hpp boost/sql_cli/statement.hpp
+//! @brief Allows the execution of queries against the database.
+//!
+//! Each statement performs its queries through the connection instance it is
+//! bound to at creation time, which means that use of the same statement
+//! instance across threads requires explicit synchronization. In practice
+//! statement instances should be considered thread specific, as thread
+//! synchronization may already be provided by the underlying technology at the
+//! connection level.
+//! @nosubgrouping
+
+class statement
+{
+public:
+ //! @name Constructors
+ //@{
+ //! Binds the new instance with connection 'c'.
+ statement(connection & c) : stmt(c.create_statement()) {}
+ //@}
+
+ //! @name Statement preparation
+ //@{
+ //! Prepares the %statement specified in the 's' parameter and binds input
+ //! parameter 'v1' to it. Overloads are provided to support binding of up
+ //! to ten parameters.
+ template <typename Value1T>
+ void prepare(std::string const & s, Value1T & v1)
+ {
+ stmt->prepare(s);
+ bind_param(1, v1);
+ }
+
+ template <typename Value1T, typename Value2T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2)
+ {
+ prepare(s, v1);
+ bind_param(2, v2);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2, Value3T & v3)
+ {
+ prepare(s, v1, v2);
+ bind_param(3, v3);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4)
+ {
+ prepare(s, v1, v2, v3);
+ bind_param(4, v4);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T, typename Value5T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4, Value5T & v5)
+ {
+ prepare(s, v1, v2, v3, v4);
+ bind_param(5, v5);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T, typename Value5T, typename Value6T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4, Value5T & v5, Value6T & v6)
+ {
+ prepare(s, v1, v2, v3, v4, v5);
+ bind_param(6, v6);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T, typename Value5T, typename Value6T,
+ typename Value7T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4, Value5T & v5, Value6T & v6,
+ Value7T & v7)
+ {
+ prepare(s, v1, v2, v3, v4, v5, v6);
+ bind_param(7, v7);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T, typename Value5T, typename Value6T,
+ typename Value7T, typename Value8T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4, Value5T & v5, Value6T & v6,
+ Value7T & v7, Value8T & v8)
+ {
+ prepare(s, v1, v2, v3, v4, v5, v6, v7);
+ bind_param(8, v8);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T, typename Value5T, typename Value6T,
+ typename Value7T, typename Value8T, typename Value9T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4, Value5T & v5, Value6T & v6,
+ Value7T & v7, Value8T & v8, Value9T & v9)
+ {
+ prepare(s, v1, v2, v3, v4, v5, v6, v7, v8);
+ bind_param(9, v9);
+ }
+
+ template <typename Value1T, typename Value2T, typename Value3T,
+ typename Value4T, typename Value5T, typename Value6T,
+ typename Value7T, typename Value8T, typename Value9T,
+ typename Value10T>
+ void prepare(std::string const & s, Value1T & v1, Value2T & v2,
+ Value3T & v3, Value4T & v4, Value5T & v5, Value6T & v6,
+ Value7T & v7, Value8T & v8, Value9T & v9, Value10T & v10)
+ {
+ prepare(s, v1, v2, v3, v4, v5, v6, v7, v8, v9);
+ bind_param(10, v10);
+ }
+ //@}
+
+ //! @name Statement execution
+ //@{
+ //! Executes a previously prepared %statement.
+ void exec() { return stmt->exec(); }
+ //! Executes the %statement passed as argument 's' directly.
+ void exec(std::string const & s) { return stmt->exec(s); }
+ //@}
+
+private:
+ friend class result_set;
+
+ template <typename ValueT>
+ void bind_param(int n, ValueT & v)
+ {
+ stmt->bind_param(n, v);
+ }
+
+ std::auto_ptr<detail::result_set_base> create_result_set() const
+ {
+ return stmt->create_result_set();
+ }
+
+ boost::scoped_ptr<detail::statement_base> stmt;
+};
+
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_STATEMENT_HPP)

Added: sandbox/sql_cli/libs/sql_cli/build/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/Jamfile 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,55 @@
+
+subproject libs/sql_cli/build ;
+
+import ./odbc ;
+
+SOURCES = backend_traits database dispatch odbc_column odbc_connection
+ odbc_environment odbc_result_set odbc_statement ;
+
+template sql-cli
+ : # source
+ ../src/$(SOURCES).cpp
+# <template>odbc
+ : # build requirements
+ sql-cli-odbc-lib
+ [ common-names ] # magic for install and auto-link features
+ <include>$(BOOST_ROOT) <sysinclude>$(BOOST_ROOT)
+ : # build variants
+ debug release
+ ;
+
+lib boost_sql_cli
+ : # source
+ <template>sql-cli
+ : # build requirements
+ : # build variants
+ ;
+
+dll boost_sql_cli
+ : # source
+ <template>sql-cli
+ <dll>@boost/libs/signals/build/boost_signals
+ : # build requirements
+ <define>BOOST_ALL_DYN_LINK=1 # tell source we're building dll's
+ <runtime-link>dynamic # build only for dynamic runtimes
+ : # build variants
+ ;
+
+install sql_cli lib
+ : <lib>boost_sql_cli <dll>boost_sql_cli
+ ;
+
+stage stage/lib : <lib>boost_sql_cli <dll>boost_sql_cli
+ :
+ # copy to a path rooted at BOOST_ROOT:
+ <locate>$(BOOST_ROOT)
+ # make sure the names of the libraries are correctly named:
+ [ common-names ]
+ # add this target to the "stage" and "all" psuedo-targets:
+ <target>stage
+ <target>all
+ :
+ debug release
+ ;
+
+# end

Added: sandbox/sql_cli/libs/sql_cli/build/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/Jamfile.v2 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,47 @@
+# Boost.SqlCli
+#
+# Copyright (c) 2006 - 2007 Nicola Musatti. Distributed under the Boost
+# Software License, Version 1.0. (See accompanying file
+# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+project boost/sql_cli
+ : source-location ../src
+ ;
+
+import common ;
+
+rule borland-path ( properties * )
+{
+ local res ;
+ if ( <toolset>borland in $(properties) )
+ {
+ local path = [ common.get-absolute-tool-path [
+ common.get-invocation-command borland : bcc32 ] ] ;
+ path-constant borland_root : $(path:D) ;
+ res = <search>$(borland_root)/lib/psdk ;
+ }
+ return $(res) ;
+}
+
+SOURCES =
+ backend
+ odbc_column
+ odbc_connection
+ odbc_environment
+ odbc_result_set
+ odbc_state
+ odbc_statement
+ ;
+
+lib odbc
+ :
+ : <name>odbc32
+# <toolset>borland:<search>"C:/Program Files/Borland/CBuilder6/Lib/Psdk"
+ <conditional>@borland-path
+ ;
+
+lib boost_sql_cli
+ : $(SOURCES).cpp /boost/signals//boost_signals odbc
+ : <link>shared:<define>BOOST_SQL_CLI_DYN_LINK=1
+ ;
+

Added: sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.sln
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.sln 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,29 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "boost_sql_cli-vc80-mt-gd-1_34", "boost_sql_cli.vcproj", "{5868EE50-29FE-4BB6-8307-655DC5BBFA1C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "demo", "demo.vcproj", "{B71CBF46-80E1-46D8-9C11-F6471EFA46F1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {5868EE50-29FE-4BB6-8307-655DC5BBFA1C} = {5868EE50-29FE-4BB6-8307-655DC5BBFA1C}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5868EE50-29FE-4BB6-8307-655DC5BBFA1C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5868EE50-29FE-4BB6-8307-655DC5BBFA1C}.Debug|Win32.Build.0 = Debug|Win32
+ {5868EE50-29FE-4BB6-8307-655DC5BBFA1C}.Release|Win32.ActiveCfg = Release|Win32
+ {5868EE50-29FE-4BB6-8307-655DC5BBFA1C}.Release|Win32.Build.0 = Release|Win32
+ {B71CBF46-80E1-46D8-9C11-F6471EFA46F1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B71CBF46-80E1-46D8-9C11-F6471EFA46F1}.Debug|Win32.Build.0 = Debug|Win32
+ {B71CBF46-80E1-46D8-9C11-F6471EFA46F1}.Release|Win32.ActiveCfg = Release|Win32
+ {B71CBF46-80E1-46D8-9C11-F6471EFA46F1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal

Added: sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.suo
==============================================================================
Binary file. No diff available.

Added: sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.vcproj
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/boost_sql_cli.vcproj 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,350 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="boost_sql_cli-vc80-mt-gd-1_35"
+ ProjectGUID="{5868EE50-29FE-4BB6-8307-655DC5BBFA1C}"
+ RootNamespace="libboost_sql_cli-vc80-mt-gd-1_33_1"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\..\bin.v2\libs\sql_cli\build\msvc-8.0\debug\threading-multi"
+ IntermediateDirectory="..\..\..\..\bin.v2\libs\sql_cli\build\msvc-8.0\debug\threading-multi"
+ ConfigurationType="2"
+ WholeProgramOptimization="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="0"
+ OmitFramePointers="false"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\..\.."
+ PreprocessorDefinitions="BOOST_ALL_DYN_LINK=1"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ DisableLanguageExtensions="false"
+ WarningLevel="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib boost_signals-vc80-mt-gd-1_35.lib"
+ AdditionalLibraryDirectories="..\..\..\..\bin.v2\libs\signals\build\msvc-8.0\debug\threading-multi"
+ GenerateDebugInformation="true"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\backend.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\odbc_column.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\odbc_connection.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\odbc_environment.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\odbc_result_set.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\odbc_state.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\odbc_statement.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\backend.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\backend_traits.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\column.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\column_base.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\config.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\connection.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\connection_base.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\error.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\field.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\field_base.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\null_value.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_column.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_config.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_connection.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_environment.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_error.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_field.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_handle.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_param.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_result_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_row.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_state.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\odbc_statement.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\result_set.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\result_set_base.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\result_set_iterator.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\row.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\row_base.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\statement.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\statement_base.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\static_param.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\static_value.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\traits.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\odbc\value_buffer.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\sql_cli\detail\value_types.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/demo.vcproj
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/demo.vcproj 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="demo"
+ ProjectGUID="{B71CBF46-80E1-46D8-9C11-F6471EFA46F1}"
+ AssemblyReferenceSearchPaths="&quot;..\..\..\..\bin.v2\libs\sql_cli\build\msvc-8.0\debug\threading-multi&quot;;&quot;..\..\..\..\bin.v2\libs\si\build\msvc-8.0\debug\threading-multignals&quot;"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="..\..\..\..\bin.v2\libs\sql_cli\example\msvc-8.0\debug\threading-multi"
+ IntermediateDirectory="..\..\..\..\bin.v2\libs\sql_cli\example\msvc-8.0\debug\threading-multi"
+ ConfigurationType="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="0"
+ OmitFramePointers="false"
+ WholeProgramOptimization="false"
+ AdditionalIncludeDirectories="..\..\..\.."
+ RuntimeLibrary="3"
+ BufferSecurityCheck="false"
+ WarningLevel="0"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalLibraryDirectories="&quot;..\..\..\..\bin.v2\libs\signals\build\msvc-8.0\debug\threading-multi&quot;;&quot;..\..\..\..\bin.v2\libs\sql_cli\build\msvc-8.0\debug\threading-multi&quot;"
+ GenerateDebugInformation="true"
+ LinkTimeCodeGeneration="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\example\demo.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/readme.txt
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/readme.txt 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,17 @@
+* Boost.SqlCli library ------------------------------------------------------ *
+
+* Copyright Nicola Musatti 2006. Use, modification, and distribution are
+* subject to the Boost Software License, Version 1.0. (See accompanying
+* file LICENSE_1_0.txt or copy at http:www.boost.org/LICENSE_1_0.txt)
+
+* See http:www.boost.org/libs/sql_cli for library home page. ---------------- *
+
+readme.txt - VC++ 8.0 Project files
+
+The project files in this directory should be sufficient to allow building and
+debugging of the Boost.SqlCli dynamic library and the demo program. The projects
+use the same path convention used by the Boost.Build (v2) system and assume
+that the Boost.Signals library has been built. In order to build the projects
+you can either use bjam or run the enclosed setup.bat command file, which
+builds Boost.Signals with the required options.
+

Added: sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/setup.bat
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/msvc-8.0/setup.bat 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,5 @@
+REM CommandInterpreter: $(COMSPEC)
+if "%BOOST_ROOT%"=="" set BOOST_ROOT="..\..\..\.."
+pushd %BOOST_ROOT%\libs\signals\build
+bjam --v2 toolset=msvc-8.0 variant=debug threading=multi
+popd

Added: sandbox/sql_cli/libs/sql_cli/build/odbc.jam
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/build/odbc.jam 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,67 @@
+
+rule sql-cli-odbc-lib ( toolset variant : properties * )
+{
+ # if SQL_CLI_ODBC_LIB is set we trust the user to know which library/ies
+ # must be linked
+ set-as-singleton SQL_CLI_ODBC_LIB ;
+ if $(SQL_CLI_ODBC_LIB)
+ {
+ for local l in $(SQL_CLI_ODBC_LIB)
+ {
+ properties += <library-file>$(l) ;
+ }
+ }
+ else if $(NT)
+ {
+ set-as-singleton PROGRAMFILES BCCROOT ;
+ PROGRAMFILES ?= "C:\\Program Files" ;
+ # For Borland either BCCROOT is set or we assume BCB6
+ if [ MATCH ^(borland).* : $(toolset) ]
+ {
+ BCCROOT ?= $(PROGRAMFILES:J=" ")/Borland/CBuilder6 ;
+ properties += <$(toolset)><*><library-file>$(BCCROOT)/Lib/Psdk/odbc32.lib ;
+ }
+ # For Microsoft only VC++ 8.x is supported. Either MSSdk is set or it
+ # is assumed to be under VC80_ROOT\PlatformSDK
+ else if [ MATCH ^(vc-8).* : $(toolset) ]
+ {
+ set-as-singleton VC80_ROOT ;
+ VC80_ROOT ?= $(PROGRAMFILES:J=" ")"\\Microsoft Visual Studio 8\\VC" ;
+ MSSdk ?= $(VC80_ROOT:J=" ")/PlatformSDK ;
+ properties += <$(toolset)><*><library-file>$(MSSdk)/lib/odbc32.lib ;
+ }
+ else if [ MATCH .*(mingw).* : $(toolset) ]
+ {
+ properties += <$(toolset)><*><library-file>$(MINGW_ROOT_DIRECTORY)/lib/libodbc32.a ;
+ properties += <$(toolset)><*><library-file>$(MINGW_ROOT_DIRECTORY)/lib/libodbccp32.a ;
+ }
+ else
+ {
+ properties += <build>no ;
+ }
+ }
+ # To be added
+ else if $(OS) = LINUX
+ {
+ properties += <build>no ;
+ }
+ else
+ {
+ properties += <build>no ;
+ }
+ return $(properties) ;
+}
+
+template odbc
+ : # source
+ : # build requirements
+# <vc-8_0><*><library-file>"C:\\Program Files\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\lib\\odbc32.lib"
+# <borland><*><library-file>"C:\\Program Files\\Borland\\CBuilder6\\Lib\\Psdk\\odbc32.lib"
+# <borland-5_6_4><*><library-file>"C:\\Program Files\\Borland\\CBuilder6\\Lib\\Psdk\\odbc32.lib"
+# <borland-5_8_2><*><library-file>"C:\\Program Files\\Borland\\BDS\\4.0\\Lib\\Psdk\\odbc32.lib"
+# <mingw><*><library-file>"D:\\opt\\Dev-Cpp\\lib\\libodbc32.a"
+# <mingw><*><library-file>"D:\\opt\\Dev-Cpp\\lib\\libodbccp32.a"
+ sql-cli-odbc-lib
+ : # build variants
+ ;
+

Added: sandbox/sql_cli/libs/sql_cli/doc/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/Jamfile.v2 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,34 @@
+# Boost.SqlCli
+#
+# Copyright (c) 2006 - 2007 Nicola Musatti.
+# Distributed under the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+using quickbook ;
+
+xml sql_cli
+ :
+ sql_cli.qbk
+ :
+ <xsl:param>boost.root=../../../..
+ <xsl:param>boost.libraries=../../../../libs/libraries.htm
+ <xsl:param>navig.graphics.path="../../../../doc/html/images/ "
+ <xsl:param>chapter.autolabel=0
+ <xsl:param>chunk.section.depth=8
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>toc.section.depth=2
+ <xsl:param>toc.max.depth=1
+ <xsl:param>generate.section.toc.level=1
+ <xsl:param>generate.toc="\"chapter toc,title section toc,title\""
+ ;
+
+boostbook standalone
+ :
+ sql_cli
+ ;
+
+install html
+ :
+ /boost//doc/html/boostbook.css
+ ;
+

Added: sandbox/sql_cli/libs/sql_cli/doc/architecture.qbk
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/architecture.qbk 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,58 @@
+[/
+[article Boost.SqlCli - Design & Rationale
+ [quickbook 1.4]
+ [version 0.2]
+ [authors [Musatti, Nicola]]
+ [copyright 2007 Nicola Musatti]
+ [purpose The design of the Boost.SqlCli library]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+ [last-revision $Date: 2007/04/23 16:13:13 $]
+]
+]
+
+[section:architecture Architecture]
+
+The main elements of a DBMS access library have been identified in a rather
+uniform way across several libraries and Boost.SqlCli is no exception. Thus we
+have a =connection= class that represents an interface towards a database; a
+=statement= class, which allows users to perform queries against the database
+and a =result_set= that allows navigation of retrieved data and their structure.
+The =column= class describes a field in the retrieved data and the =row= class
+represents a retrieved record, whose fields' values are represented by means of
+the =field= class.
+
+The handle/body idiom is used pervasively across the library to make it possible
+to represent most of its elements by means of classes with value semantics,
+which use inheritance to provide a uniform representation over the available
+backends. Each backend provides support for a specific DBMS product or
+technology, such as ODBC, PostgreSQL, etc.
+
+[section:connection The =connection= class]
+
+The =connection= class represents a communication channel towards a DBMS of a
+specific technology. The choice of technology is performed at instantiation
+time, by means of a conventional construction parameter.
+
+In order to perform the actual connection a combination of database, user and
+password parameters have to be supplied. This choice will have to be modified in
+order to provide means to specify other connection parameters, but a specific
+mechanism for this has yet to be identified.
+
+The =connection= class is also meant to represent the granularity at which safe
+multithreaded access to databases may be performed. Ideally the library should
+guarantee that in-thread access to a connection should not require explicit
+synchronization and that all queries issued against a specific connection are
+performed sequentially. Currently, however, no explict support for multithreaded
+applications is available.
+
+Another feature that will be added in a later release is explicit connection
+pooling.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/architecture.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/architecture.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,89 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Architecture</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<link rel="start" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="up" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="prev" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="next" href="todo.html" title=" Things to Do">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sqlcli.architecture"></a> Architecture
+</h2></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="architecture.html#boost_sqlcli.architecture.connection"> The <code class="literal">connection</code>
+ class</a></span></dt></dl></div>
+<p>
+ The main elements of a DBMS access library have been identified in a rather
+ uniform way across several libraries and Boost.SqlCli is no exception. Thus
+ we have a <code class="literal">connection</code> class that represents an interface
+ towards a database; a <code class="literal">statement</code> class, which allows users
+ to perform queries against the database and a <code class="literal">result_set</code>
+ that allows navigation of retrieved data and their structure. The <code class="literal">column</code>
+ class describes a field in the retrieved data and the <code class="literal">row</code>
+ class represents a retrieved record, whose fields' values are represented by
+ means of the <code class="literal">field</code> class.
+ </p>
+<p>
+ The handle/body idiom is used pervasively across the library to make it possible
+ to represent most of its elements by means of classes with value semantics,
+ which use inheritance to provide a uniform representation over the available
+ backends. Each backend provides support for a specific DBMS product or technology,
+ such as ODBC, PostgreSQL, etc.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.architecture.connection"></a><a href="architecture.html#boost_sqlcli.architecture.connection" title=" The connection
+ class"> The <code class="literal">connection</code>
+ class</a>
+</h3></div></div></div>
+<p>
+ The <code class="literal">connection</code> class represents a communication channel
+ towards a DBMS of a specific technology. The choice of technology is performed
+ at instantiation time, by means of a conventional construction parameter.
+ </p>
+<p>
+ In order to perform the actual connection a combination of database, user
+ and password parameters have to be supplied. This choice will have to be
+ modified in order to provide means to specify other connection parameters,
+ but a specific mechanism for this has yet to be identified.
+ </p>
+<p>
+ The <code class="literal">connection</code> class is also meant to represent the granularity
+ at which safe multithreaded access to databases may be performed. Ideally
+ the library should guarantee that in-thread access to a connection should
+ not require explicit synchronization and that all queries issued against
+ a specific connection are performed sequentially. Currently, however, no
+ explict support for multithreaded applications is available.
+ </p>
+<p>
+ Another feature that will be added in a later release is explicit connection
+ pooling.
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2006, 2007 Nicola Musatti</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="todo.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/open_issues.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/open_issues.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,353 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Open Issues</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<link rel="start" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="up" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="prev" href="todo.html" title=" Things to Do">
+<link rel="next" href="reference.html" title=" Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="todo.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sqlcli.open_issues"></a> Open Issues
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> The Architecture</span></dt>
+<dt><span class="section"><a href="open_issues.html#boost_sqlcli.open_issues.interface"> The Programming
+ Interface</a></span></dt>
+<dt><span class="section"><a href="open_issues.html#boost_sqlcli.open_issues.structure"> Library Structure
+ and Design</a></span></dt>
+<dt><span class="section"> ODBC Specific Issues</span></dt>
+<dt><span class="section"> Environment</span></dt>
+<dt><span class="section"> Desiderata</span></dt>
+</dl></div>
+<p>
+ There are several areas within Boost.SqlCli where key design decisions have
+ yet to be made. What follows is an attempt to organise these open issues in
+ a coherent structure. I realize that some of it is plain stream of consciousness.
+ I hope you can find something useful here and I apologize if you do not.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.open_issues.architecture"></a> The Architecture
+</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="underline">Should fields contain values or just provide
+ means to retrieve them?</span> This appears to be the approach taken
+ in bpeabody's attempt to implement a similar library.
+ On the other hand filling fields with values that aren't going to be used
+ is a waste of resources.
+ </li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.open_issues.interface"></a><a href="open_issues.html#boost_sqlcli.open_issues.interface" title=" The Programming
+ Interface"> The Programming
+ Interface</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="open_issues.html#boost_sqlcli.open_issues.interface.connection_parms">
+ Connection Parameters</a></span></dt>
+<dt><span class="section"><a href="open_issues.html#boost_sqlcli.open_issues.interface.query_parms"> Query
+ Parameters</a></span></dt>
+<dt><span class="section"><a href="open_issues.html#boost_sqlcli.open_issues.interface.result_sets"> Handling
+ Query Results</a></span></dt>
+<dt><span class="section"> Diagnostics</span></dt>
+<dt><span class="section"><a href="open_issues.html#boost_sqlcli.open_issues.interface.sql"> Representation
+ of SQL Entities</a></span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.open_issues.interface.connection_parms"></a><a href="open_issues.html#boost_sqlcli.open_issues.interface.connection_parms" title="
+ Connection Parameters">
+ Connection Parameters</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="underline">How should parameters to =connection::connect()=
+ be defined?</span> The current solution of using db, name &amp; password
+ is naive, not necessarily meaningful on all platforms and doesn't allow
+ the specification of additional, platform specific connection parameters.
+ In order to provide support for more parameters there are several possible
+ approaches. One is the use of native connection strings, as used by the
+ different platforms; this is the simplest alternative in terms of implementation,
+ but it isn't very friendly towards developers of cross-dbms solutions.
+ Another alternative is the use of an ad hoc syntax; one interesting candidate
+ is the URL based one used by SqlAlchemy,
+ a Python DB access / Object-Relational mapping framework. A completely
+ different approach would be to provide parameters as name/value pairs;
+ here however the choice of representation is problematic: is it reasonable
+ to impose the use of a specific container type? I guess not, however
+ using a range of iterators over pairs of strings would imply the use
+ of a template member function, which I'd very much like to avoid; a solution
+ could be the use of some form of polymorphic iterator, but that would
+ mean getting it approved for Boost and eventually the committee.
+ </li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.open_issues.interface.query_parms"></a><a href="open_issues.html#boost_sqlcli.open_issues.interface.query_parms" title=" Query
+ Parameters"> Query
+ Parameters</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="underline">Implement named parameters?</span> What
+ about technologies that do not support them? I don't like the idea of
+ preprocessing statements' text before passing it to the backend, yet
+ libraries such as SOCI, Borland's VCL and SqlApi++ do provide this functionality.
+ </li>
+<li>
+ Provide value assignment for input parameters?
+ </li>
+<li>
+ Provide binding for output parameters?
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.open_issues.interface.result_sets"></a><a href="open_issues.html#boost_sqlcli.open_issues.interface.result_sets" title=" Handling
+ Query Results"> Handling
+ Query Results</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="underline">How should full rows be represented dynamically?</span>
+ From a dynamic point of view a row is a sequence of boost/TR1 <code class="literal">any</code>,
+ but how should that sequence be represented in practice? I'd rather avoid
+ member function templates if possible, but the alternative seems to be
+ to force a specific collection on users.
+ </li>
+<li>
+<span class="underline">Consider storing result sets for multipass
+ iteration.</span> Note however that many databases expect buffers
+ in which to store possibly converted values. This may lead to excessive
+ copying. All in all it may be preferable to defer multipass iteration
+ to some library above SqlCli.
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.open_issues.interface.diagnostics"></a> Diagnostics
+</h4></div></div></div>
+<div class="itemizedlist"><ul type="disc"><li>
+<span class="underline">How should informative diagnostics for non
+ fatal problems be provided, e.g. field truncation?</span> One idea
+ is to combine actual values and diagnostic information in a custom return
+ type, which provides access to both by means of conversion operators.
+ This ensures that diagnostic information is "pushed" onto the
+ user, but it is rather cumbersome, especially when the wrapping function
+ is an overloaded operator. However callback oriented mechanisms are even
+ more cumbersome. Providing specific flags in the relevant classes "a
+ la iostreams" appears to be the least of all evils. On the other
+ hand this too has its shortcomings, most notably the fact that the place
+ where to look for errors is not always obvious, nor are the operations
+ that might invalidate an error condition.
+ </li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.open_issues.interface.sql"></a><a href="open_issues.html#boost_sqlcli.open_issues.interface.sql" title=" Representation
+ of SQL Entities"> Representation
+ of SQL Entities</a>
+</h4></div></div></div>
+<p>
+ One area of Boost.SqlCli that is still at a very primitive stage is the
+ representation of concepts pertaining to those elements of the SQL language
+ that users may need to handle explicitly.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="underline">Should SQL data types be made explicit, e.g.
+ by providing an enum, or is it better to keep using only C++ types, e.g.
+ by means of <code class="literal">std::type_info?</code> (see <code class="literal">boost::sql_cli::column</code>).</span>
+ This may become necessary to allow multiple C++ types to map to the same
+ SQL type and to handle portability issues (e.g. sizes of C++ types vs.
+ sizes of SQL types). Moreover the implementation dependence of <code class="literal">std::type_info</code>
+ makes it a poor choice for an external representation. On the other hand
+ it is not yet clear to me how significant the SQL CLI standard types
+ are for different CLI libraries (eg. Oracle's OCI, PostgreSQL's libpq,
+ etc.). An alternative is to mimick how column types are specified in
+ SQL DDL, possibly by providing an enum for types and integral values
+ for size and precision.
+ <div class="itemizedlist"><ul type="circle"><li>
+ Could Boost.Serialization's strong typedef be useful in this respect?
+ </li></ul></div>
+</li>
+<li>
+ Should a way to check that a specific type is supported by the underlying
+ technology be provided?
+ </li>
+<li>
+ More generally, should a way be devised to query the available, possibly
+ technology specific, functionality?
+ </li>
+</ul></div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.open_issues.structure"></a><a href="open_issues.html#boost_sqlcli.open_issues.structure" title=" Library Structure
+ and Design"> Library Structure
+ and Design</a>
+</h3></div></div></div>
+<p>
+ This section describes the portions of the library's internals that still
+ need to be clearly outlined.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="underline">Are there better ways to implement pseudo virtual
+ member function templates?</span> Should plain virtual member functions
+ be used instead? (see <code class="literal">boost::sql_cli::statement</code> and
+ <code class="literal">boost::sql_cli::row</code>). I consider this rather critical,
+ because the template based interface is very convenient and because it
+ would be nice if each backend could support their own specific data types,
+ without forsaking type safety. For the time being dispatching has been
+ factored into the database class.
+ </li>
+<li>
+<span class="underline">Does it make sense to use the handle-body idiom
+ for classes that can only be instantiated by factories, e.g. <code class="literal">boost::sql_cli::column</code>?</span>
+ Probably yes, as they can be implemented by means of the flyweight pattern
+ and thus be passed by value.
+ </li>
+<li>
+<span class="underline">Should a plugin oriented architecture be introduced
+ to facilitate the introduction of support for additional technologies?</span>
+ This really depends on whether the aim is to provide a complete solution
+ to database access for the most popular DBMS's or to define an interface
+ so that DBMS suppliers may implement it. I'm inclined to think that adding
+ support for additional backends should be made as easy as possible, but
+ proper plugins are not really needed.
+ </li>
+<li>
+<span class="underline">Should fixed size field buffers be supported?</span>
+ If so, consider using TR1's arrays. These may come handy for long character
+ fields and blobs, and to prevent unrestrained buffer growth.
+ </li>
+<li>
+ It has been suggested that some sort of "null" backend be provided,
+ where result sets may be filled by hand, for testing purposes. I'm not
+ convinced it is worth the effort, though.
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.open_issues.odbc"></a> ODBC Specific Issues
+</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<code class="literal">odbc::handle</code> : Cycle on all the available diagnostic
+ records?
+ </li>
+<li>
+<code class="literal">odbc::connection</code> : Allocating/deallocating handles in
+ the constructor/destructor favours a RAII approach, but limits the available
+ diagnostics. Is it reasonable? (the same goes for <code class="literal">odbc::environment</code>
+ and <code class="literal">odbc::statement</code>)
+ </li>
+<li>
+<code class="literal">odbc::field</code> : Are we sure that the column size is always
+ known?
+ </li>
+<li>
+<code class="literal">odbc::field</code> : Is it always acceptable to read the whole
+ column in a single step?
+ </li>
+<li>
+<code class="literal">odbc::field</code> : Should <code class="literal">SQL_NO_TOTAL</code>
+ be handled?
+ </li>
+</ul></div>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="../images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>
+ </p>
+<p>
+ <code class="literal">odbc::warning</code> is currently commented out and doesn't
+ appear likely to resurrect
+ </p>
+<p>
+ </p>
+</td></tr>
+</table></div>
+<div class="itemizedlist"><ul type="disc"><li>
+<code class="literal">odbc::warning</code> : Should it be possible to combine warnings?
+ e.g.
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ Construct a list
+ </li>
+<li>
+ Keep only the last one
+ </li>
+</ul></div>
+</li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.open_issues.environment"></a> Environment
+</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc"><li>
+ How do you check for the presence of the test database(s) from within Boost.Test?
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ Ideally it should be possible to perform the tests on a set of available
+ databases.
+ </li>
+<li>
+ Some form of test configuration should be provided.
+ </li>
+</ul></div>
+</li></ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.open_issues.desiderata"></a> Desiderata
+</h3></div></div></div>
+<p>
+ These aren't even open issues, but rather features that would be nice to
+ have.
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Support for multithreading at connection level.
+ </li>
+<li>
+ Connection pooling.
+ </li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2006, 2007 Nicola Musatti</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="todo.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/reference.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/reference.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<link rel="start" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="up" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="prev" href="open_issues.html" title=" Open Issues">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="open_issues.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sqlcli.reference"></a> Reference
+</h2></div></div></div>
+<p>
+ The Doxygen reference hasn't been integrated in this document yet. You can
+ find it here.
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2006, 2007 Nicola Musatti</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="open_issues.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/todo.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/boost_sqlcli/todo.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,176 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title> Things to Do</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<link rel="start" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="up" href="../index.html" title="Boost.SqlCli 0.2">
+<link rel="prev" href="architecture.html" title=" Architecture">
+<link rel="next" href="open_issues.html" title=" Open Issues">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="architecture.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="open_issues.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sqlcli.todo"></a> Things to Do
+</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"> Design and Implementation</span></dt>
+<dt><span class="section"> Environment</span></dt>
+<dt><span class="section"> Documentation</span></dt>
+</dl></div>
+<p>
+ This chapter lists things to do, in contrast with the next one which describes
+ decisions to take. Ideally all the following items should be included in the
+ next release, but it's quite possible that some of them may lead to further
+ unresolved issues, especially since some tasks involve design rather than coding.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.todo.devel"></a> Design and Implementation
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"> ODBC Backend</span></dt></dl></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Revise the architecture of backends so as to make it simpler and more obvious
+ for others to understand what should be done to implement additional backends.
+ <div class="itemizedlist"><ul type="circle"><li>
+ Document the backend API and conventions.
+ </li></ul></div>
+</li>
+<li>
+ Add support for date and time fields, using Boost.DateTime as C++ counterpart.
+ </li>
+<li>
+ Identify which additional types for parameters and fields should be supported.
+ </li>
+<li>
+ Support dynamic typing by providing boost/TR1 <code class="literal">any</code> input
+ parameters and field values.
+ </li>
+<li>
+ Support composite data types / full row handling, both for user convenience
+ and to leverage batch query processing that might be supported by the underlying
+ technology.
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ Use TR1 <code class="literal">tuple</code> for static typing.
+ </li>
+<li>
+ Is an underlying collection necessary for dynamic typing or are iterators
+ sufficient? In the first case, should <code class="literal">std::vector</code>
+ be used?
+ </li>
+</ul></div>
+</li>
+<li>
+ Support iterative statement composition, e.g. by providing an <code class="literal">add_parameter()</code>
+ and a parameterless <code class="literal">prepare()</code> member function to the
+ <code class="literal">statement</code> class.
+ </li>
+<li>
+ Revise the representation of connection parameters.
+ <div class="itemizedlist"><ul type="circle"><li>
+ Consider using a collection of name/value pairs, to be passed unchanged
+ to the underlying DBMS.
+ </li></ul></div>
+</li>
+<li>
+ Add support for stored procedures.
+ </li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.todo.devel.odbc_backend"></a> ODBC Backend
+</h4></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Revise the use of <code class="literal">traits</code> and <code class="literal">value_buffer</code>
+ for <code class="literal">odbc::field</code>.
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ Unify the two?
+ </li>
+<li>
+ Generalize everything that might be useful to implement other backends.
+ </li>
+</ul></div>
+</li>
+<li>
+ Handle iterated value retrieval from ODBC primitives (see <code class="literal">boost::sql_cli::odbc::row</code>).
+ </li>
+</ul></div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.todo.environment"></a> Environment
+</h3></div></div></div>
+<div class="toc"><dl><dt><span class="section"> Tests</span></dt></dl></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Replace Dev-C++ with Code::Blocks as g++ IDE. Dev-C++ development appears
+ to have stopped and the IDE hasn't aged well. Code::Blocks appears to be
+ definitely more promising.
+ </li>
+<li>
+ Port to 32 bit Linux.
+ </li>
+<li>
+ Port to 64 bit systems.
+ </li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="boost_sqlcli.todo.environment.tests"></a> Tests
+</h4></div></div></div>
+<div class="itemizedlist"><ul type="disc"><li>
+ A mechanism for the repetition of tests over different DBMS.
+ <div class="itemizedlist"><ul type="circle"><li>
+ A local configuration file for the available DBMS's.
+ </li></ul></div>
+</li></ul></div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.todo.doc"></a> Documentation
+</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ User's guide
+ </li>
+<li>
+ Reference manual
+ </li>
+<li>
+ Rationale
+ <div class="itemizedlist"><ul type="circle"><li>
+ With a comparison with other libraries, especially SOCI.
+ </li></ul></div>
+</li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><small>Copyright © 2006, 2007 Nicola Musatti</small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="architecture.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="open_issues.html"><img src="../images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/boostbook.css 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,519 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompany-
+ ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 9pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 90%;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 9pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ /* Program listings in tables don't get borders */
+ td .programlisting,
+ td .screen
+ {
+ margin: 0pc 0pc 0pc 0pc;
+ padding: 0pc 0pc 0pc 0pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ text-align: right;
+ }
+
+ .spirit-nav a
+ {
+ color: white;
+ padding-left: 0.5em;
+ }
+
+ .spirit-nav img
+ {
+ border-width: 0px;
+ }
+
+/*=============================================================================
+ Table of contents
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 80%;
+ line-height: 1.15;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ font-size: 9pt;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ font-size: 80%;
+ }
+
+/*=============================================================================
+ Blurbs
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 9pt; /* A little bit smaller than the main text */
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt,
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+ div.variablelist dl dt
+ {
+ margin-bottom: 0.2em;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 0em 0em 0.5em 2em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p,
+ div.variablelist dl dd p
+ {
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ /* Links */
+ a
+ {
+ color: #005a9c;
+ }
+
+ a:visited
+ {
+ color: #9c5a9c;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #FFFFFF; }
+ .dk_grey_bkd { background-color: #999999; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ background-color: #F0F0F0;
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ color: #00A000;
+ }
+ }
+
+ @media print
+ {
+ /* Links */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid gray;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid gray;
+ border-collapse: collapse;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid gray;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid gray;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }
+
+/*=============================================================================
+ Images
+=============================================================================*/
+
+ span.inlinemediaobject img
+ {
+ vertical-align: middle;
+ }
\ No newline at end of file

Added: sandbox/sql_cli/libs/sql_cli/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/index.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,294 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Boost.SqlCli 0.2</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.70.1">
+<link rel="start" href="index.html" title="Boost.SqlCli 0.2">
+<link rel="next" href="boost_sqlcli/architecture.html" title=" Architecture">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%">
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="boost_sqlcli/architecture.html"><img src="images/next.png" alt="Next"></a></div>
+<div class="article" lang="en">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="boost_sqlcli"></a>Boost.SqlCli 0.2</h2></div>
+<div><div class="authorgroup"><div class="author"><h3 class="author">
+<span class="firstname">Nicola</span> <span class="surname">Musatti</span>
+</h3></div></div></div>
+<div><p class="copyright">Copyright © 2006, 2007 Nicola Musatti</p></div>
+<div><div class="legalnotice">
+<a name="id455057"></a><p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div>
+<hr>
+</div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"> Introduction</span></dt>
+<dd><dl><dt><span class="section"> A Concrete Example</span></dt></dl></dd>
+<dt><span class="section"> Architecture</span></dt>
+<dd><dl><dt><span class="section"><a href="boost_sqlcli/architecture.html#boost_sqlcli.architecture.connection"> The <code class="literal">connection</code>
+ class</a></span></dt></dl></dd>
+<dt><span class="section"> Things to Do</span></dt>
+<dd><dl>
+<dt><span class="section"> Design and Implementation</span></dt>
+<dt><span class="section"> Environment</span></dt>
+<dt><span class="section"> Documentation</span></dt>
+</dl></dd>
+<dt><span class="section"> Open Issues</span></dt>
+<dd><dl>
+<dt><span class="section"> The Architecture</span></dt>
+<dt><span class="section"><a href="boost_sqlcli/open_issues.html#boost_sqlcli.open_issues.interface"> The Programming
+ Interface</a></span></dt>
+<dt><span class="section"><a href="boost_sqlcli/open_issues.html#boost_sqlcli.open_issues.structure"> Library Structure
+ and Design</a></span></dt>
+<dt><span class="section"> ODBC Specific Issues</span></dt>
+<dt><span class="section"> Environment</span></dt>
+<dt><span class="section"> Desiderata</span></dt>
+</dl></dd>
+<dt><span class="section"> Reference</span></dt>
+</dl>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="boost_sqlcli.intro"></a> Introduction
+</h2></div></div></div>
+<div class="toc"><dl><dt><span class="section"> A Concrete Example</span></dt></dl></div>
+<p>
+ In the spring of 2006 a lively discussion took place on the Boost Developers'
+ mailing list about submitting the SOCI
+ library to Boost as a first step towards presenting a proposal to the Standard
+ Committee for an interface to relational databases. SOCI is an actively developed
+ open source project that is attracting a growing user base, but its current
+ API is significantly different from Boost's (and the Committee's) conventions.
+ Boost.SqlCli is an exploration of what a more "compliant" API might
+ look like.
+ </p>
+<p>
+ Boost.SqlCli aims at providing a C++ <a href="http://en.wikipedia.org/wiki/Call_Level_Interface" target="_top">Call
+ Level Interface</a> to SQL systems that feels natural to C++ programmers.
+ This is achieved by pursuing several design goals:
+ </p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<span class="underline">Abstraction from the underlying technology</span>:
+ Boost.SqlCli should hide all details of the underling DBMS technology, with
+ the possible exception of
+ <div class="itemizedlist"><ul type="circle">
+<li>
+ the parameters required to connect to a database
+ </li>
+<li>
+ access to product specific extensions to the standard SQL syntax
+ </li>
+</ul></div>
+</li>
+<li>
+<span class="underline">Minimality</span>: While coverage of SQL features
+ should be as wide as possible, Boost.SqlCli should only provide the minimal
+ functionality required to provide native and standard types' values for query
+ parameters and to retrieve the same types of values from query results. In
+ addition dynamic type handling will be provided by means of boost/TR1 any.
+ Bare bones support for handling composite data will be provided by means
+ of boost/TR1 tuples for the static, type-safe approach and by means of ranges
+ of boost/TR1 any for the dynamic approach.
+ </li>
+<li><span class="underline">Use of modern, idiomatic C++</span></li>
+</ul></div>
+<p>
+ Development is still at a very early stage. The fundamental elements of the
+ library's interface are present, but only a subset of the planned scalar data
+ types are supported as parameter and field values. Dynamic typing and composite
+ data are not available yet. Currently only a very incomplete ODBC backend is
+ available. The library has been built with Microsoft Visual C++ 2005, Borland
+ C++ Builder 6 &amp; 2006, as well as MinGW G++ 3.4.2, all under Windows.
+ </p>
+<p>
+ The documentation contains a currently very incomplete Architecture section,
+ which describes the structure of the library and explains why it was done this
+ way; a To Do chapter, which lists those work items that have been identified
+ in a reasonably clear way; and an Open Issues section, which presents topics
+ over which a definite decision hasn't been made or which would be nice to have
+ but haven't been planned yet. A Doxygen generated reference is also available.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_sqlcli.intro.example"></a> A Concrete Example
+</h3></div></div></div>
+<p>
+ This is the <code class="literal">demo.cpp</code> demo program from the <code class="literal">libs/sql_cli/examples</code>
+ directory. Hopefully it is self explanatory...
+ </p>
+<p>
+ </p>
+<p>
+
+</p>
+<pre class="programlisting">
+<span class="comment">// An example of what a Boost database interface library might look like
+</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">ostream</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#define</span> <span class="identifier">BOOST_ALL_DYN_LINK</span> <span class="number">1</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">optional</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">detail</span><span class="special">/</span><span class="identifier">workaround</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#if</span> <span class="identifier">BOOST_WORKAROUND</span><span class="special">(</span><span class="identifier">__BORLANDC__</span><span class="special">,</span> <span class="special">&lt;=</span> <span class="number">0x564</span><span class="special">)</span>
+<span class="preprocessor"># pragma</span> <span class="identifier">hdrstop</span>
+<span class="preprocessor">#endif</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">none</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">sql_cli</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="keyword">try</span>
+ <span class="special">{</span>
+
+<span class="comment">// Connect to a database, specifying the underlying technology. Unless
+</span><span class="comment">// specific SQL syntax is used, this should be the only place where the
+</span><span class="comment">// actual DBMS product / technology is evident
+</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">connection</span> <span class="identifier">conn</span><span class="special">(</span><span class="string">"ODBC"</span><span class="special">);</span>
+ <span class="identifier">conn</span><span class="special">.</span><span class="identifier">connect</span><span class="special">(</span><span class="string">"PVAL"</span><span class="special">,</span> <span class="string">"dba"</span><span class="special">,</span> <span class="string">"sql"</span><span class="special">);</span>
+
+<span class="comment">// Execute a couple of simple queries
+</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">statement</span> <span class="identifier">st</span><span class="special">(</span><span class="identifier">conn</span><span class="special">);</span>
+ <span class="keyword">try</span>
+ <span class="special">{</span>
+ <span class="identifier">st</span><span class="special">.</span><span class="identifier">exec</span><span class="special">(</span><span class="string">"drop table t"</span><span class="special">);</span>
+ <span class="identifier">conn</span><span class="special">.</span><span class="identifier">commit</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="keyword">catch</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">error</span> <span class="special">&amp;</span> <span class="identifier">e</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cerr</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">st</span><span class="special">.</span><span class="identifier">exec</span><span class="special">(</span><span class="string">"create table t ( a int, b varchar(10), c double, "</span>
+ <span class="string">"d_is_an_incredibly_long_column_name int )"</span><span class="special">);</span>
+
+<span class="comment">// Execute a parameterized query
+</span>
+ <span class="keyword">long</span> <span class="identifier">a</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">b</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">c</span><span class="special">;</span> <span class="comment">// a value that may be null
+</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">null_value</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;</span> <span class="identifier">d</span><span class="special">;</span> <span class="comment">// a value that is always null
+</span>
+ <span class="comment">// prepare the statement and bind input parameters, so get to be able
+</span> <span class="comment">// to execute it in a loop with different values
+</span>
+ <span class="identifier">st</span><span class="special">.</span><span class="identifier">prepare</span><span class="special">(</span><span class="string">"insert into t ( a, b, c, "</span>
+ <span class="string">"d_is_an_incredibly_long_column_name ) values ( ?, ?, ?, ? )"</span><span class="special">,</span>
+ <span class="identifier">a</span><span class="special">,</span> <span class="identifier">b</span><span class="special">,</span> <span class="identifier">c</span><span class="special">,</span> <span class="identifier">d</span><span class="special">);</span>
+
+ <span class="keyword">char</span> <span class="special">*</span> <span class="identifier">nums</span><span class="special">[]</span> <span class="special">=</span> <span class="special">{</span> <span class="string">"zero"</span><span class="special">,</span> <span class="string">"one"</span><span class="special">,</span> <span class="string">"two"</span><span class="special">,</span> <span class="string">"three"</span><span class="special">,</span> <span class="string">"four"</span><span class="special">,</span> <span class="string">"five"</span><span class="special">,</span> <span class="string">"six"</span><span class="special">,</span>
+ <span class="string">"seven"</span><span class="special">,</span> <span class="string">"eight"</span><span class="special">,</span> <span class="string">"nine"</span> <span class="special">};</span>
+ <span class="keyword">for</span> <span class="special">(</span> <span class="identifier">a</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">a</span> <span class="special">&lt;</span> <span class="number">10</span><span class="special">;</span> <span class="special">++</span><span class="identifier">a</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">b</span> <span class="special">=</span> <span class="identifier">nums</span><span class="special">[</span><span class="identifier">a</span><span class="special">];</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">a</span> <span class="special">%</span> <span class="number">2</span> <span class="special">)</span>
+ <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">a</span> <span class="special">*</span> <span class="number">1.1</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">none</span><span class="special">;</span>
+ <span class="identifier">st</span><span class="special">.</span><span class="identifier">exec</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="identifier">conn</span><span class="special">.</span><span class="identifier">commit</span><span class="special">();</span>
+
+<span class="comment">// Execute a query that returns a result set
+</span>
+ <span class="identifier">st</span><span class="special">.</span><span class="identifier">exec</span><span class="special">(</span><span class="string">"select * from t"</span><span class="special">);</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">result_set</span> <span class="identifier">rs</span><span class="special">(</span><span class="identifier">st</span><span class="special">);</span>
+
+ <span class="comment">// Explore the structure of the result set
+</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"No. of columns: "</span> <span class="special">&lt;&lt;</span> <span class="identifier">rs</span><span class="special">.</span><span class="identifier">column_count</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="keyword">for</span> <span class="special">(</span> <span class="keyword">int</span> <span class="identifier">i</span> <span class="special">=</span> <span class="number">0</span><span class="special">;</span> <span class="identifier">i</span> <span class="special">&lt;</span> <span class="identifier">rs</span><span class="special">.</span><span class="identifier">column_count</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">rs</span><span class="special">[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">"\t "</span> <span class="special">&lt;&lt;</span> <span class="identifier">rs</span><span class="special">[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">type</span><span class="special">().</span><span class="identifier">name</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'('</span> <span class="special">&lt;&lt;</span>
+ <span class="identifier">rs</span><span class="special">[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">size</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="string">", "</span> <span class="special">&lt;&lt;</span> <span class="identifier">rs</span><span class="special">[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">precision</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">')'</span><span class="special">;</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="identifier">rs</span><span class="special">[</span><span class="identifier">i</span><span class="special">].</span><span class="identifier">nullable</span><span class="special">()</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\t null"</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <span class="comment">// Print the actual results
+</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"\nRows:\n"</span><span class="special">;</span>
+ <span class="keyword">for</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">result_set</span><span class="special">::</span><span class="identifier">iterator</span> <span class="identifier">i</span> <span class="special">=</span> <span class="identifier">rs</span><span class="special">.</span><span class="identifier">begin</span><span class="special">();</span>
+ <span class="identifier">i</span> <span class="special">!=</span> <span class="identifier">rs</span><span class="special">.</span><span class="identifier">end</span><span class="special">();</span> <span class="special">++</span><span class="identifier">i</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">row</span> <span class="keyword">const</span> <span class="special">&amp;</span> <span class="identifier">r</span> <span class="special">=</span> <span class="special">*</span><span class="identifier">i</span><span class="special">;</span>
+
+ <span class="comment">// Columns may be accessed by position...
+</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">r</span><span class="special">[</span><span class="number">0</span><span class="special">].</span><span class="identifier">get</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;()</span> <span class="special">&lt;&lt;</span> <span class="string">"\t "</span><span class="special">;</span>
+
+ <span class="comment">// ...or by name
+</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">r</span><span class="special">[</span><span class="string">"b"</span><span class="special">].</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">&gt;()</span> <span class="special">&lt;&lt;</span> <span class="string">"\t "</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="identifier">c</span> <span class="special">=</span> <span class="identifier">r</span><span class="special">[</span><span class="number">2</span><span class="special">].</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="keyword">double</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="special">!</span> <span class="identifier">c</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"(null)\t "</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="special">*</span><span class="identifier">c</span> <span class="special">&lt;&lt;</span> <span class="string">"\t "</span><span class="special">;</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;</span> <span class="identifier">d</span> <span class="special">=</span> <span class="identifier">r</span><span class="special">[</span><span class="number">3</span><span class="special">].</span><span class="identifier">get</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">optional</span><span class="special">&lt;</span><span class="keyword">long</span><span class="special">&gt;</span> <span class="special">&gt;();</span>
+ <span class="keyword">if</span> <span class="special">(</span> <span class="special">!</span> <span class="identifier">d</span> <span class="special">)</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"(null)\n"</span><span class="special">;</span>
+ <span class="keyword">else</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="special">*</span><span class="identifier">d</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">st</span><span class="special">.</span><span class="identifier">exec</span><span class="special">(</span><span class="string">"drop table t"</span><span class="special">);</span>
+ <span class="identifier">conn</span><span class="special">.</span><span class="identifier">commit</span><span class="special">();</span>
+ <span class="identifier">conn</span><span class="special">.</span><span class="identifier">disconnect</span><span class="special">();</span>
+ <span class="special">}</span>
+ <span class="keyword">catch</span> <span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">sql_cli</span><span class="special">::</span><span class="identifier">error</span> <span class="special">&amp;</span> <span class="identifier">e</span> <span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cerr</span> <span class="special">&lt;&lt;</span> <span class="identifier">e</span><span class="special">.</span><span class="identifier">what</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="char">'\n'</span><span class="special">;</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Failure!\n"</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">1</span><span class="special">;</span>
+ <span class="special">}</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">"Success!\n"</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+
+</pre>
+<p>
+ </p>
+<p>
+ </p>
+<p>
+ </p>
+<div class="calloutlist"><table border="0" summary="Callout list"></table></div>
+<p>
+ </p>
+<p>
+ </p>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><small><p>Last revised: April 23, 2007 at 16:13:13 GMT</p></small></td>
+<td align="right"><small></small></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="boost_sqlcli/architecture.html"><img src="images/next.png" alt="Next"></a></div>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/annotated.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/annotated.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Class List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>Boost.SqlCli Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td class="indexvalue">Provides a description for one column in a result set </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td class="indexvalue">Represents a connection to a database of a specific backend type. Different <a class="el" href="classboost_1_1sql__cli_1_1connection.html" title="Represents a connection to a database of a specific backend type. Different connection...">connection</a> instances may be used in different threads without explicit synchronization </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1error.html">boost::sql_cli::error</a></td><td class="indexvalue">Exception class that represents a generic SqlCli <a class="el" href="classboost_1_1sql__cli_1_1error.html" title="Exception class that represents a generic SqlCli error.">error</a> </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1field.html">boost::sql_cli::field</a></td><td class="indexvalue">Represents a field in a row of a statement's result set </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1null__data.html">boost::sql_cli::null_data</a></td><td class="indexvalue">Exception class that represents a generic SqlCli <a class="el" href="classboost_1_1sql__cli_1_1error.html" title="Exception class that represents a generic SqlCli error.">error</a>. Represents null values in context where they should not be ignored. This may be thrown when retrieving a null value in an object that is not suitable to represent it (i.e. it is neither a boost::optional&lt;&gt; nor a sql_cli::null_value&lt;&gt;) </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structboost_1_1sql__cli_1_1null__value.html">boost::sql_cli::null_value&lt; ValueT &gt;</a></td><td class="indexvalue">Represents a typed null value. It is typically used for input parameters that are always null </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td class="indexvalue">Represents the results of a query that returns data and provides means to iterate over both the data and a description of its structure </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1row.html">boost::sql_cli::row</a></td><td class="indexvalue">Allows iteration over the fields in a result set's row </td></tr>
+ <tr><td class="indexkey"><a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a></td><td class="indexvalue">Allows the execution of queries against the database </td></tr>
+</table>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1column-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1column-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::column Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1column.html#c21ef033de32ff4ac5bb138020f811d0">name</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1column.html#2a2101edbfd50370204fe0a5c86c9c33">nullable</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1column.html#40eaf12d1b8fc23a6e5c967a11fc0f6a">number</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1column.html#b1df2958709b684ca8284e5d634a8484">precision</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1column.html#f94f79233b4327eded11629b480bc4af">size</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1column.html#45f93089b4c6bf2423cf1c7e1fcc7bfd">type</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1column.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1column.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,49 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::column Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1column.html">column</a></div>
+<h1>boost::sql_cli::column Class Reference</h1><!-- doxytag: class="boost::sql_cli::column" --><code>#include &lt;boost/sql_cli/column.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Provides a description for one column in a result set.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c21ef033de32ff4ac5bb138020f811d0"></a><!-- doxytag: member="boost::sql_cli::column::name" ref="c21ef033de32ff4ac5bb138020f811d0" args="() const" -->
+std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1column.html#c21ef033de32ff4ac5bb138020f811d0">name</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the column's name. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="45f93089b4c6bf2423cf1c7e1fcc7bfd"></a><!-- doxytag: member="boost::sql_cli::column::type" ref="45f93089b4c6bf2423cf1c7e1fcc7bfd" args="() const" -->
+const std::type_info &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1column.html#45f93089b4c6bf2423cf1c7e1fcc7bfd">type</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the type_info object associated with the column's C++ type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f94f79233b4327eded11629b480bc4af"></a><!-- doxytag: member="boost::sql_cli::column::size" ref="f94f79233b4327eded11629b480bc4af" args="() const" -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1column.html#f94f79233b4327eded11629b480bc4af">size</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the column's size. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b1df2958709b684ca8284e5d634a8484"></a><!-- doxytag: member="boost::sql_cli::column::precision" ref="b1df2958709b684ca8284e5d634a8484" args="() const" -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1column.html#b1df2958709b684ca8284e5d634a8484">precision</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the column's precision. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a2101edbfd50370204fe0a5c86c9c33"></a><!-- doxytag: member="boost::sql_cli::column::nullable" ref="2a2101edbfd50370204fe0a5c86c9c33" args="() const" -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1column.html#2a2101edbfd50370204fe0a5c86c9c33">nullable</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Indicates whether the columns accepts null values. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40eaf12d1b8fc23a6e5c967a11fc0f6a"></a><!-- doxytag: member="boost::sql_cli::column::number" ref="40eaf12d1b8fc23a6e5c967a11fc0f6a" args="() const" -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1column.html#40eaf12d1b8fc23a6e5c967a11fc0f6a">number</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the column's number. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>column.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1connection-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1connection-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::connection Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html#832577c80a3a0b2f37c70099aa354209">commit</a>()</td><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html#8ab0faa6e62f9694eca63d5f8410ddd9">connect</a>(std::string const &amp;srv, std::string const &amp;user, std::string const &amp;auth)</td><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html#ce133d7ed0fe607dd49ea834a2fbbb0c">connection</a>(std::string const &amp;dbms)</td><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html#dd601e07245d0cebccbbc30b86867cf9">connection</a>(std::string const &amp;dbms, std::string const &amp;srv, std::string const &amp;user, std::string const &amp;auth)</td><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html#10c2d2d885e45ab534aa18287c07afa4">disconnect</a>()</td><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html#0f817876f4ebb0a7aaf73b90937b51c2">rollback</a>()</td><td><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1connection.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1connection.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::connection Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1connection.html">connection</a></div>
+<h1>boost::sql_cli::connection Class Reference</h1><!-- doxytag: class="boost::sql_cli::connection" --><code>#include &lt;boost/sql_cli/connection.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Represents a connection to a database of a specific backend type. Different <a class="el" href="classboost_1_1sql__cli_1_1connection.html" title="Represents a connection to a database of a specific backend type. Different connection...">connection</a> instances may be used in different threads without explicit synchronization.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Constructors</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce133d7ed0fe607dd49ea834a2fbbb0c"></a><!-- doxytag: member="boost::sql_cli::connection::connection" ref="ce133d7ed0fe607dd49ea834a2fbbb0c" args="(std::string const &amp;dbms)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1connection.html#ce133d7ed0fe607dd49ea834a2fbbb0c">connection</a> (std::string const &amp;dbms)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes the backend specified in the 'dbms' argument. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd601e07245d0cebccbbc30b86867cf9"></a><!-- doxytag: member="boost::sql_cli::connection::connection" ref="dd601e07245d0cebccbbc30b86867cf9" args="(std::string const &amp;dbms, std::string const &amp;srv, std::string const &amp;user, std::string const &amp;auth)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1connection.html#dd601e07245d0cebccbbc30b86867cf9">connection</a> (std::string const &amp;dbms, std::string const &amp;srv, std::string const &amp;user, std::string const &amp;auth)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initializes the backend and opens the 'srv' database, with user 'user' and password 'auth'. <br></td></tr>
+<tr><td colspan="2"><br><h2>Connection management</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8ab0faa6e62f9694eca63d5f8410ddd9"></a><!-- doxytag: member="boost::sql_cli::connection::connect" ref="8ab0faa6e62f9694eca63d5f8410ddd9" args="(std::string const &amp;srv, std::string const &amp;user, std::string const &amp;auth)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1connection.html#8ab0faa6e62f9694eca63d5f8410ddd9">connect</a> (std::string const &amp;srv, std::string const &amp;user, std::string const &amp;auth)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Opens the 'srv' database, with user 'user' and password 'auth'. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="10c2d2d885e45ab534aa18287c07afa4"></a><!-- doxytag: member="boost::sql_cli::connection::disconnect" ref="10c2d2d885e45ab534aa18287c07afa4" args="()" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1connection.html#10c2d2d885e45ab534aa18287c07afa4">disconnect</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Closes the connection to the database. <br></td></tr>
+<tr><td colspan="2"><br><h2>Transaction management</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="832577c80a3a0b2f37c70099aa354209"></a><!-- doxytag: member="boost::sql_cli::connection::commit" ref="832577c80a3a0b2f37c70099aa354209" args="()" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1connection.html#832577c80a3a0b2f37c70099aa354209">commit</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Commits the current transaction. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f817876f4ebb0a7aaf73b90937b51c2"></a><!-- doxytag: member="boost::sql_cli::connection::rollback" ref="0f817876f4ebb0a7aaf73b90937b51c2" args="()" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1connection.html#0f817876f4ebb0a7aaf73b90937b51c2">rollback</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Rolls back the current transaction. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>connection.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1error-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1error-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::error Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1error.html">boost::sql_cli::error</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1error.html#d47eea96403c7665a7cc5a66c30ee7c0">error</a>(std::string const &amp;msg)</td><td><a class="el" href="classboost_1_1sql__cli_1_1error.html">boost::sql_cli::error</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1error.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1error.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::error Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1error.html">error</a></div>
+<h1>boost::sql_cli::error Class Reference</h1><!-- doxytag: class="boost::sql_cli::error" --><code>#include &lt;boost/sql_cli/error.hpp&gt;</code>
+<p>
+Inherited by <a class="el" href="classboost_1_1sql__cli_1_1null__data.html">boost::sql_cli::null_data</a>.
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Exception class that represents a generic SqlCli <a class="el" href="classboost_1_1sql__cli_1_1error.html" title="Exception class that represents a generic SqlCli error.">error</a>.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Constructors</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d47eea96403c7665a7cc5a66c30ee7c0"></a><!-- doxytag: member="boost::sql_cli::error::error" ref="d47eea96403c7665a7cc5a66c30ee7c0" args="(std::string const &amp;msg)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1error.html#d47eea96403c7665a7cc5a66c30ee7c0">error</a> (std::string const &amp;msg)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The 'msg' string will be returned by the what() member function, possibly augmented with internal information. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>error.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1field-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1field-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::field Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1field.html">boost::sql_cli::field</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1field.html#81f18e246405067c7a61c684659acf69">get</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1field.html">boost::sql_cli::field</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1field.html#81aed06593dd761a64c66ad73289b7b1">number</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1field.html">boost::sql_cli::field</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1field.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1field.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::field Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1field.html">field</a></div>
+<h1>boost::sql_cli::field Class Reference</h1><!-- doxytag: class="boost::sql_cli::field" --><code>#include &lt;boost/sql_cli/field.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Represents a field in a row of a statement's result set.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="81f18e246405067c7a61c684659acf69"></a><!-- doxytag: member="boost::sql_cli::field::get" ref="81f18e246405067c7a61c684659acf69" args="() const" -->
+template&lt;typename ValueT&gt; </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">ValueT&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1field.html#81f18e246405067c7a61c684659acf69">get</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the field's value. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="81aed06593dd761a64c66ad73289b7b1"></a><!-- doxytag: member="boost::sql_cli::field::number" ref="81aed06593dd761a64c66ad73289b7b1" args="() const" -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1field.html#81aed06593dd761a64c66ad73289b7b1">number</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the field's number. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>field.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__data-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__data-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::null_data Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1null__data.html">boost::sql_cli::null_data</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1error.html#d47eea96403c7665a7cc5a66c30ee7c0">error</a>(std::string const &amp;msg)</td><td><a class="el" href="classboost_1_1sql__cli_1_1error.html">boost::sql_cli::error</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__data.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__data.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::null_data Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1null__data.html">null_data</a></div>
+<h1>boost::sql_cli::null_data Class Reference</h1><!-- doxytag: class="boost::sql_cli::null_data" --><!-- doxytag: inherits="boost::sql_cli::error" --><code>#include &lt;boost/sql_cli/error.hpp&gt;</code>
+<p>
+Inherits <a class="el" href="classboost_1_1sql__cli_1_1error.html">boost::sql_cli::error</a>.
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Exception class that represents a generic SqlCli <a class="el" href="classboost_1_1sql__cli_1_1error.html" title="Exception class that represents a generic SqlCli error.">error</a>. Represents null values in context where they should not be ignored. This may be thrown when retrieving a null value in an object that is not suitable to represent it (i.e. it is neither a boost::optional&lt;&gt; nor a sql_cli::null_value&lt;&gt;).
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>error.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__value-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1null__value-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::null_value&lt; ValueT &gt; Member List</h1>This is the complete list of members for <a class="el" href="structboost_1_1sql__cli_1_1null__value.html">boost::sql_cli::null_value&lt; ValueT &gt;</a>, including all inherited members.<p><table>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1result__set-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1result__set-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,19 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::result_set Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#9dfdc481b7db4ef8dda9382eaa71402f">begin</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#6b480217521a0e46c04e1e32059c9aa4">column_count</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#86237b996ce20a5860e6f6423ce8348f">end</a>() const</td><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#0f675cd0a488be062cbb2a8a4e49310f">operator[]</a>(int i) const </td><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#8b8844d68ee4e120ca0a885182e30326">operator[]</a>(std::string const &amp;n) const </td><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#dc73c98ea7642e3c1b056d9c8a5a37d0">result_set</a>(statement &amp;s)</td><td><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1result__set.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1result__set.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,51 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::result_set Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1result__set.html">result_set</a></div>
+<h1>boost::sql_cli::result_set Class Reference</h1><!-- doxytag: class="boost::sql_cli::result_set" --><code>#include &lt;boost/sql_cli/result_set.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Represents the results of a query that returns data and provides means to iterate over both the data and a description of its structure.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Constructors</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dc73c98ea7642e3c1b056d9c8a5a37d0"></a><!-- doxytag: member="boost::sql_cli::result_set::result_set" ref="dc73c98ea7642e3c1b056d9c8a5a37d0" args="(statement &amp;s)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#dc73c98ea7642e3c1b056d9c8a5a37d0">result_set</a> (<a class="el" href="classboost_1_1sql__cli_1_1statement.html">statement</a> &amp;s)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Associates a new <a class="el" href="classboost_1_1sql__cli_1_1result__set.html" title="Represents the results of a query that returns data and provides means to iterate...">result_set</a> with <a class="el" href="classboost_1_1sql__cli_1_1statement.html" title="Allows the execution of queries against the database.">statement</a> 's'. <br></td></tr>
+<tr><td colspan="2"><br><h2>Result set description</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6b480217521a0e46c04e1e32059c9aa4"></a><!-- doxytag: member="boost::sql_cli::result_set::column_count" ref="6b480217521a0e46c04e1e32059c9aa4" args="() const" -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#6b480217521a0e46c04e1e32059c9aa4">column_count</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of columns returned by the last query executed by the associated <a class="el" href="classboost_1_1sql__cli_1_1statement.html" title="Allows the execution of queries against the database.">statement</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f675cd0a488be062cbb2a8a4e49310f"></a><!-- doxytag: member="boost::sql_cli::result_set::operator[]" ref="0f675cd0a488be062cbb2a8a4e49310f" args="(int i) const " -->
+<a class="el" href="classboost_1_1sql__cli_1_1column.html">column</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#0f675cd0a488be062cbb2a8a4e49310f">operator[]</a> (int i) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a description of the 'i'-th column in the result set. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8b8844d68ee4e120ca0a885182e30326"></a><!-- doxytag: member="boost::sql_cli::result_set::operator[]" ref="8b8844d68ee4e120ca0a885182e30326" args="(std::string const &amp;n) const " -->
+<a class="el" href="classboost_1_1sql__cli_1_1column.html">column</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#8b8844d68ee4e120ca0a885182e30326">operator[]</a> (std::string const &amp;n) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a description of the column named 'n' in the result set. <br></td></tr>
+<tr><td colspan="2"><br><h2>Iteration over the returned rows</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9dfdc481b7db4ef8dda9382eaa71402f"></a><!-- doxytag: member="boost::sql_cli::result_set::begin" ref="9dfdc481b7db4ef8dda9382eaa71402f" args="() const" -->
+iterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#9dfdc481b7db4ef8dda9382eaa71402f">begin</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns an iterator to the first <a class="el" href="classboost_1_1sql__cli_1_1row.html" title="Allows iteration over the fields in a result set's row.">row</a> in the result set. Dereferencing an iterator yields an instance of the <a class="el" href="classboost_1_1sql__cli_1_1row.html" title="Allows iteration over the fields in a result set's row.">row</a> class. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86237b996ce20a5860e6f6423ce8348f"></a><!-- doxytag: member="boost::sql_cli::result_set::end" ref="86237b996ce20a5860e6f6423ce8348f" args="() const" -->
+iterator&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1result__set.html#86237b996ce20a5860e6f6423ce8348f">end</a> () const</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns an iterator to one past the last <a class="el" href="classboost_1_1sql__cli_1_1row.html" title="Allows iteration over the fields in a result set's row.">row</a> in the result set. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>result_set.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1row-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1row-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::row Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1row.html">boost::sql_cli::row</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1row.html#517a41e831942553487b2aa2d793c677">operator[]</a>(int i) const </td><td><a class="el" href="classboost_1_1sql__cli_1_1row.html">boost::sql_cli::row</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1row.html#ea4f03dc5d516236f3652d6500a9f632">operator[]</a>(std::string const &amp;n) const </td><td><a class="el" href="classboost_1_1sql__cli_1_1row.html">boost::sql_cli::row</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1row.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1row.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::row Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1row.html">row</a></div>
+<h1>boost::sql_cli::row Class Reference</h1><!-- doxytag: class="boost::sql_cli::row" --><code>#include &lt;boost/sql_cli/row.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Allows iteration over the fields in a result set's row.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Field iteration</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="517a41e831942553487b2aa2d793c677"></a><!-- doxytag: member="boost::sql_cli::row::operator[]" ref="517a41e831942553487b2aa2d793c677" args="(int i) const " -->
+<a class="el" href="classboost_1_1sql__cli_1_1field.html">field</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1row.html#517a41e831942553487b2aa2d793c677">operator[]</a> (int i) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the 'i'-th <a class="el" href="classboost_1_1sql__cli_1_1field.html" title="Represents a field in a row of a statement's result set.">field</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea4f03dc5d516236f3652d6500a9f632"></a><!-- doxytag: member="boost::sql_cli::row::operator[]" ref="ea4f03dc5d516236f3652d6500a9f632" args="(std::string const &amp;n) const " -->
+<a class="el" href="classboost_1_1sql__cli_1_1field.html">field</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1row.html#ea4f03dc5d516236f3652d6500a9f632">operator[]</a> (std::string const &amp;n) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the <a class="el" href="classboost_1_1sql__cli_1_1field.html" title="Represents a field in a row of a statement's result set.">field</a> named 'n'. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>row.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1statement-members.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1statement-members.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>boost::sql_cli::statement Member List</h1>This is the complete list of members for <a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a>, including all inherited members.<p><table>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html#a609edf8778a2148ffef9c0e276fbba2">exec</a>()</td><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html#af3477c5a2194ac017119732ef746d5a">exec</a>(std::string const &amp;s)</td><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html#d98544ccaee62a5cc33c999088f69209">prepare</a>(std::string const &amp;s, Value1T &amp;v1)</td><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a></td><td></td></tr>
+ <tr class="memlist"><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html#25038132cc30cb1d36796db160a3c220">statement</a>(connection &amp;c)</td><td><a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a></td><td></td></tr>
+</table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1statement.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/classboost_1_1sql__cli_1_1statement.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::statement Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="classboost_1_1sql__cli_1_1statement.html">statement</a></div>
+<h1>boost::sql_cli::statement Class Reference</h1><!-- doxytag: class="boost::sql_cli::statement" --><code>#include &lt;boost/sql_cli/statement.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+Allows the execution of queries against the database.
+<p>
+Each <a class="el" href="classboost_1_1sql__cli_1_1statement.html" title="Allows the execution of queries against the database.">statement</a> performs its queries through the <a class="el" href="classboost_1_1sql__cli_1_1connection.html" title="Represents a connection to a database of a specific backend type. Different connection...">connection</a> instance it is bound to at creation time, which means that use of the same <a class="el" href="classboost_1_1sql__cli_1_1statement.html" title="Allows the execution of queries against the database.">statement</a> instance across threads requires explicit synchronization. In practice <a class="el" href="classboost_1_1sql__cli_1_1statement.html" title="Allows the execution of queries against the database.">statement</a> instances should be considered thread specific, as thread synchronization may already be provided by the underlying technology at the <a class="el" href="classboost_1_1sql__cli_1_1connection.html" title="Represents a connection to a database of a s
pecific backend type. Different connection...">connection</a> level.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Constructors</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="25038132cc30cb1d36796db160a3c220"></a><!-- doxytag: member="boost::sql_cli::statement::statement" ref="25038132cc30cb1d36796db160a3c220" args="(connection &amp;c)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1statement.html#25038132cc30cb1d36796db160a3c220">statement</a> (<a class="el" href="classboost_1_1sql__cli_1_1connection.html">connection</a> &amp;c)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Binds the new instance with <a class="el" href="classboost_1_1sql__cli_1_1connection.html" title="Represents a connection to a database of a specific backend type. Different connection...">connection</a> 'c'. <br></td></tr>
+<tr><td colspan="2"><br><h2>Statement preparation</h2></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2"><a class="anchor" name="d98544ccaee62a5cc33c999088f69209"></a><!-- doxytag: member="boost::sql_cli::statement::prepare" ref="d98544ccaee62a5cc33c999088f69209" args="(std::string const &amp;s, Value1T &amp;v1)" -->
+template&lt;typename Value1T&gt; </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1statement.html#d98544ccaee62a5cc33c999088f69209">prepare</a> (std::string const &amp;s, Value1T &amp;v1)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Prepares the statement specified in the 's' parameter and binds input parameter 'v1' to it. Overloads are provided to support binding of up to ten parameters. <br></td></tr>
+<tr><td colspan="2"><br><h2>Statement execution</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a609edf8778a2148ffef9c0e276fbba2"></a><!-- doxytag: member="boost::sql_cli::statement::exec" ref="a609edf8778a2148ffef9c0e276fbba2" args="()" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1statement.html#a609edf8778a2148ffef9c0e276fbba2">exec</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes a previously prepared statement. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af3477c5a2194ac017119732ef746d5a"></a><!-- doxytag: member="boost::sql_cli::statement::exec" ref="af3477c5a2194ac017119732ef746d5a" args="(std::string const &amp;s)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classboost_1_1sql__cli_1_1statement.html#af3477c5a2194ac017119732ef746d5a">exec</a> (std::string const &amp;s)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Executes the statement passed as argument 's' directly. <br></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>statement.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/doxygen.css
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/doxygen.css 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,358 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+ font-size: 90%;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+}
+H3 {
+ font-size: 100%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+ width: 100%;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.nav {
+ width: 100%;
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ padding: 2px;
+ line-height: 140%;
+}
+DIV.navtab {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+TD.navtab {
+ font-size: 70%;
+}
+A.qindex {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D;
+}
+A.qindex:visited {
+ text-decoration: none;
+ font-weight: bold;
+ color: #1A419D
+}
+A.qindex:hover {
+ text-decoration: none;
+ background-color: #ddddff;
+}
+A.qindexHL {
+ text-decoration: none;
+ font-weight: bold;
+ background-color: #6666cc;
+ color: #ffffff;
+ border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+ text-decoration: none;
+ background-color: #6666cc;
+ color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+.fragment {
+ font-family: monospace, fixed;
+ font-size: 95%;
+}
+PRE.fragment {
+ border: 1px solid #CCCCCC;
+ background-color: #f5f5f5;
+ margin-top: 4px;
+ margin-bottom: 4px;
+ margin-left: 2px;
+ margin-right: 8px;
+ padding-left: 6px;
+ padding-right: 6px;
+ padding-top: 4px;
+ padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+
+DIV.groupHeader {
+ margin-left: 16px;
+ margin-top: 12px;
+ margin-bottom: 6px;
+ font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
+BODY {
+ background: white;
+ color: black;
+ margin-right: 20px;
+ margin-left: 20px;
+}
+TD.indexkey {
+ background-color: #e8eef2;
+ font-weight: bold;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+ background-color: #e8eef2;
+ font-style: italic;
+ padding-right : 10px;
+ padding-top : 2px;
+ padding-left : 10px;
+ padding-bottom : 2px;
+ margin-left : 0px;
+ margin-right : 0px;
+ margin-top : 2px;
+ margin-bottom : 2px;
+ border: 1px solid #CCCCCC;
+}
+TR.memlist {
+ background-color: #f0f0f0;
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword { color: #008000 }
+SPAN.keywordtype { color: #604020 }
+SPAN.keywordflow { color: #e08000 }
+SPAN.comment { color: #800000 }
+SPAN.preprocessor { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral { color: #008080 }
+.mdescLeft {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.mdescRight {
+ padding: 0px 8px 4px 8px;
+ font-size: 80%;
+ font-style: italic;
+ background-color: #FAFAFA;
+ border-top: 1px none #E0E0E0;
+ border-right: 1px none #E0E0E0;
+ border-bottom: 1px none #E0E0E0;
+ border-left: 1px none #E0E0E0;
+ margin: 0px;
+}
+.memItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemLeft {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: none;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.memTemplParams {
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #E0E0E0;
+ border-right-color: #E0E0E0;
+ border-bottom-color: #E0E0E0;
+ border-left-color: #E0E0E0;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ color: #606060;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+.search { color: #003399;
+ font-weight: bold;
+}
+FORM.search {
+ margin-bottom: 0px;
+ margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+ color: #000080;
+ font-weight: normal;
+ background-color: #e8eef2;
+}
+TD.tiny { font-size: 75%;
+}
+a {
+ color: #1A41A8;
+}
+a:visited {
+ color: #2A3798;
+}
+.dirtab { padding: 4px;
+ border-collapse: collapse;
+ border: 1px solid #84b0c7;
+}
+TH.dirtab { background: #e8eef2;
+ font-weight: bold;
+}
+HR { height: 1px;
+ border: none;
+ border-top: 1px solid black;
+}
+
+/* Style for detailed member documentation */
+.memtemplate {
+ font-size: 80%;
+ color: #606060;
+ font-weight: normal;
+}
+.memnav {
+ background-color: #e8eef2;
+ border: 1px solid #84b0c7;
+ text-align: center;
+ margin: 2px;
+ margin-right: 15px;
+ padding: 2px;
+}
+.memitem {
+ padding: 4px;
+ background-color: #eef3f5;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #dedeee;
+ -moz-border-radius: 8px 8px 8px 8px;
+}
+.memname {
+ white-space: nowrap;
+ font-weight: bold;
+}
+.memdoc{
+ padding-left: 10px;
+}
+.memproto {
+ background-color: #d5e1e8;
+ width: 100%;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #84b0c7;
+ font-weight: bold;
+ -moz-border-radius: 8px 8px 8px 8px;
+}
+.paramkey {
+ text-align: right;
+}
+.paramtype {
+ white-space: nowrap;
+}
+.paramname {
+ color: #602020;
+ font-style: italic;
+ white-space: nowrap;
+}
+/* End Styling for detailed member documentation */
+
+/* for the tree view */
+.ftvtree {
+ font-family: sans-serif;
+ margin:0.5em;
+}
+.directory { font-size: 9pt; font-weight: bold; }
+.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
+.directory > h3 { margin-top: 0; }
+.directory p { margin: 0px; white-space: nowrap; }
+.directory div { display: none; margin: 0px; }
+.directory img { vertical-align: -30%; }

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/doxygen.png
==============================================================================
Binary file. No diff available.

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/functions.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/functions.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Class Members</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="tabs">
+ <ul>
+ <li class="current">All</li>
+ <li>Functions</li>
+ </ul>
+</div>
+Here is a list of all documented class members with links to the class documentation for each member:
+<p>
+<ul>
+<li>begin()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#9dfdc481b7db4ef8dda9382eaa71402f">boost::sql_cli::result_set</a>
+<li>column_count()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#6b480217521a0e46c04e1e32059c9aa4">boost::sql_cli::result_set</a>
+<li>commit()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#832577c80a3a0b2f37c70099aa354209">boost::sql_cli::connection</a>
+<li>connect()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#8ab0faa6e62f9694eca63d5f8410ddd9">boost::sql_cli::connection</a>
+<li>connection()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#ce133d7ed0fe607dd49ea834a2fbbb0c">boost::sql_cli::connection</a>
+<li>disconnect()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#10c2d2d885e45ab534aa18287c07afa4">boost::sql_cli::connection</a>
+<li>end()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#86237b996ce20a5860e6f6423ce8348f">boost::sql_cli::result_set</a>
+<li>error()
+: <a class="el" href="classboost_1_1sql__cli_1_1error.html#d47eea96403c7665a7cc5a66c30ee7c0">boost::sql_cli::error</a>
+<li>exec()
+: <a class="el" href="classboost_1_1sql__cli_1_1statement.html#a609edf8778a2148ffef9c0e276fbba2">boost::sql_cli::statement</a>
+<li>get()
+: <a class="el" href="classboost_1_1sql__cli_1_1field.html#81f18e246405067c7a61c684659acf69">boost::sql_cli::field</a>
+<li>name()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#c21ef033de32ff4ac5bb138020f811d0">boost::sql_cli::column</a>
+<li>nullable()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#2a2101edbfd50370204fe0a5c86c9c33">boost::sql_cli::column</a>
+<li>number()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#40eaf12d1b8fc23a6e5c967a11fc0f6a">boost::sql_cli::column</a>
+, <a class="el" href="classboost_1_1sql__cli_1_1field.html#81aed06593dd761a64c66ad73289b7b1">boost::sql_cli::field</a>
+<li>operator[]()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#0f675cd0a488be062cbb2a8a4e49310f">boost::sql_cli::result_set</a>
+, <a class="el" href="classboost_1_1sql__cli_1_1row.html#ea4f03dc5d516236f3652d6500a9f632">boost::sql_cli::row</a>
+, <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#8b8844d68ee4e120ca0a885182e30326">boost::sql_cli::result_set</a>
+<li>precision()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#b1df2958709b684ca8284e5d634a8484">boost::sql_cli::column</a>
+<li>prepare()
+: <a class="el" href="classboost_1_1sql__cli_1_1statement.html#d98544ccaee62a5cc33c999088f69209">boost::sql_cli::statement</a>
+<li>result_set()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#dc73c98ea7642e3c1b056d9c8a5a37d0">boost::sql_cli::result_set</a>
+<li>rollback()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#0f817876f4ebb0a7aaf73b90937b51c2">boost::sql_cli::connection</a>
+<li>size()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#f94f79233b4327eded11629b480bc4af">boost::sql_cli::column</a>
+<li>statement()
+: <a class="el" href="classboost_1_1sql__cli_1_1statement.html#25038132cc30cb1d36796db160a3c220">boost::sql_cli::statement</a>
+<li>type()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#45f93089b4c6bf2423cf1c7e1fcc7bfd">boost::sql_cli::column</a>
+</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/functions_func.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/functions_func.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Class Members - Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="tabs">
+ <ul>
+ <li>All</li>
+ <li class="current">Functions</li>
+ </ul>
+</div>
+&nbsp;
+<p>
+<ul>
+<li>begin()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#9dfdc481b7db4ef8dda9382eaa71402f">boost::sql_cli::result_set</a>
+<li>column_count()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#6b480217521a0e46c04e1e32059c9aa4">boost::sql_cli::result_set</a>
+<li>commit()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#832577c80a3a0b2f37c70099aa354209">boost::sql_cli::connection</a>
+<li>connect()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#8ab0faa6e62f9694eca63d5f8410ddd9">boost::sql_cli::connection</a>
+<li>connection()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#ce133d7ed0fe607dd49ea834a2fbbb0c">boost::sql_cli::connection</a>
+<li>disconnect()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#10c2d2d885e45ab534aa18287c07afa4">boost::sql_cli::connection</a>
+<li>end()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#86237b996ce20a5860e6f6423ce8348f">boost::sql_cli::result_set</a>
+<li>error()
+: <a class="el" href="classboost_1_1sql__cli_1_1error.html#d47eea96403c7665a7cc5a66c30ee7c0">boost::sql_cli::error</a>
+<li>exec()
+: <a class="el" href="classboost_1_1sql__cli_1_1statement.html#a609edf8778a2148ffef9c0e276fbba2">boost::sql_cli::statement</a>
+<li>get()
+: <a class="el" href="classboost_1_1sql__cli_1_1field.html#81f18e246405067c7a61c684659acf69">boost::sql_cli::field</a>
+<li>name()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#c21ef033de32ff4ac5bb138020f811d0">boost::sql_cli::column</a>
+<li>nullable()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#2a2101edbfd50370204fe0a5c86c9c33">boost::sql_cli::column</a>
+<li>number()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#40eaf12d1b8fc23a6e5c967a11fc0f6a">boost::sql_cli::column</a>
+, <a class="el" href="classboost_1_1sql__cli_1_1field.html#81aed06593dd761a64c66ad73289b7b1">boost::sql_cli::field</a>
+<li>operator[]()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#0f675cd0a488be062cbb2a8a4e49310f">boost::sql_cli::result_set</a>
+, <a class="el" href="classboost_1_1sql__cli_1_1row.html#ea4f03dc5d516236f3652d6500a9f632">boost::sql_cli::row</a>
+, <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#8b8844d68ee4e120ca0a885182e30326">boost::sql_cli::result_set</a>
+<li>precision()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#b1df2958709b684ca8284e5d634a8484">boost::sql_cli::column</a>
+<li>prepare()
+: <a class="el" href="classboost_1_1sql__cli_1_1statement.html#d98544ccaee62a5cc33c999088f69209">boost::sql_cli::statement</a>
+<li>result_set()
+: <a class="el" href="classboost_1_1sql__cli_1_1result__set.html#dc73c98ea7642e3c1b056d9c8a5a37d0">boost::sql_cli::result_set</a>
+<li>rollback()
+: <a class="el" href="classboost_1_1sql__cli_1_1connection.html#0f817876f4ebb0a7aaf73b90937b51c2">boost::sql_cli::connection</a>
+<li>size()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#f94f79233b4327eded11629b480bc4af">boost::sql_cli::column</a>
+<li>statement()
+: <a class="el" href="classboost_1_1sql__cli_1_1statement.html#25038132cc30cb1d36796db160a3c220">boost::sql_cli::statement</a>
+<li>type()
+: <a class="el" href="classboost_1_1sql__cli_1_1column.html#45f93089b4c6bf2423cf1c7e1fcc7bfd">boost::sql_cli::column</a>
+</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/hierarchy.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/hierarchy.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Hierarchical Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>Boost.SqlCli Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
+<li><a class="el" href="classboost_1_1sql__cli_1_1column.html">boost::sql_cli::column</a>
+<li><a class="el" href="classboost_1_1sql__cli_1_1connection.html">boost::sql_cli::connection</a>
+<li><a class="el" href="classboost_1_1sql__cli_1_1error.html">boost::sql_cli::error</a>
+<ul>
+<li><a class="el" href="classboost_1_1sql__cli_1_1null__data.html">boost::sql_cli::null_data</a>
+</ul>
+<li><a class="el" href="classboost_1_1sql__cli_1_1field.html">boost::sql_cli::field</a>
+<li><a class="el" href="structboost_1_1sql__cli_1_1null__value.html">boost::sql_cli::null_value&lt; ValueT &gt;</a>
+<li><a class="el" href="classboost_1_1sql__cli_1_1result__set.html">boost::sql_cli::result_set</a>
+<li><a class="el" href="classboost_1_1sql__cli_1_1row.html">boost::sql_cli::row</a>
+<li><a class="el" href="classboost_1_1sql__cli_1_1statement.html">boost::sql_cli::statement</a>
+</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/index.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/index.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: Main Page</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<h1>Boost.SqlCli Documentation</h1>
+<p>
+<h3 align="center">0.0.2 </h3><ul> <li class="current">Main Page</li>
+ <li>Classes</li>
+<ul> <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+</ul>
+</ul>
+<ul> <li>Class List</li>
+ <li>Class Hierarchy</li>
+ <li>Class Members</li>
+</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/structboost_1_1sql__cli_1_1null__value.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/structboost_1_1sql__cli_1_1null__value.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+<title>Boost.SqlCli: boost::sql_cli::null_value&lt; ValueT &gt; Class Template Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.2 -->
+<div class="nav">
+<b>boost</b>::<b>sql_cli</b>::<a class="el" href="structboost_1_1sql__cli_1_1null__value.html">null_value</a></div>
+<h1>boost::sql_cli::null_value&lt; ValueT &gt; Class Template Reference</h1><!-- doxytag: class="boost::sql_cli::null_value" --><code>#include &lt;boost/sql_cli/null_value.hpp&gt;</code>
+<p>
+List of all members.<hr><a name="_details"></a><h2>Detailed Description</h2>
+<h3>template&lt;typename ValueT&gt;<br>
+ class boost::sql_cli::null_value&lt; ValueT &gt;</h3>
+
+Represents a typed null value. It is typically used for input parameters that are always null.
+<p>
+<table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+</table>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li>null_value.hpp</ul>
+<hr size="1"><address style="text-align: right;"><small>Generated on Mon Apr 23 18:12:04 2007 for Boost.SqlCli by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/tab_b.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/tab_l.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/tab_r.gif
==============================================================================
Binary file. No diff available.

Added: sandbox/sql_cli/libs/sql_cli/doc/html/reference/tabs.css
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/html/reference/tabs.css 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,102 @@
+/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
+
+DIV.tabs
+{
+ float : left;
+ width : 100%;
+ background : url("tab_b.gif") repeat-x bottom;
+ margin-bottom : 4px;
+}
+
+DIV.tabs UL
+{
+ margin : 0px;
+ padding-left : 10px;
+ list-style : none;
+}
+
+DIV.tabs LI, DIV.tabs FORM
+{
+ display : inline;
+ margin : 0px;
+ padding : 0px;
+}
+
+DIV.tabs FORM
+{
+ float : right;
+}
+
+DIV.tabs A
+{
+ float : left;
+ background : url("tab_r.gif") no-repeat right top;
+ border-bottom : 1px solid #84B0C7;
+ font-size : x-small;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+DIV.tabs A:hover
+{
+ background-position: 100% -150px;
+}
+
+DIV.tabs A:link, DIV.tabs A:visited,
+DIV.tabs A:active, DIV.tabs A:hover
+{
+ color: #1A419D;
+}
+
+DIV.tabs SPAN
+{
+ float : left;
+ display : block;
+ background : url("tab_l.gif") no-repeat left top;
+ padding : 5px 9px;
+ white-space : nowrap;
+}
+
+DIV.tabs INPUT
+{
+ float : right;
+ display : inline;
+ font-size : 1em;
+}
+
+DIV.tabs TD
+{
+ font-size : x-small;
+ font-weight : bold;
+ text-decoration : none;
+}
+
+
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+DIV.tabs SPAN {float : none;}
+/* End IE5-Mac hack */
+
+DIV.tabs A:hover SPAN
+{
+ background-position: 0% -150px;
+}
+
+DIV.tabs LI.current A
+{
+ background-position: 100% -150px;
+ border-width : 0px;
+}
+
+DIV.tabs LI.current SPAN
+{
+ background-position: 0% -150px;
+ padding-bottom : 6px;
+}
+
+DIV.nav
+{
+ background : none;
+ border : none;
+ border-bottom : 1px solid #84B0C7;
+}

Added: sandbox/sql_cli/libs/sql_cli/doc/open_issues.qbk
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/open_issues.qbk 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,218 @@
+[/
+[article Boost.SqlCli - Open Issues
+ [quickbook 1.4]
+ [version 0.1]
+ [authors [Musatti, Nicola]]
+ [copyright 2007 Nicola Musatti]
+ [purpose Open questions related to the design of the Boost.SqlCli library]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http:\/www.boost.org/LICENSE_1_0.txt])
+ ]
+ [last-revision $Date: 2007/04/23 16:13:13 $]
+]
+]
+
+[def __sqlalchemy__ [@http://http://www.sqlalchemy.org/ SqlAlchemy]]
+
+[section:open_issues Open Issues]
+
+There are several areas within Boost.SqlCli where key design decisions have yet
+to be made. What follows is an attempt to organise these open issues in a
+coherent structure. I realize that some of it is plain stream of consciousness.
+I hope you can find something useful here and I apologize if you do not.
+
+[section:architecture The Architecture]
+
+* _Should fields contain values or just provide means to retrieve them?_
+ This appears to be the approach taken in bpeabody's attempt to implement a
+ similar [@http://boost-sandbox.cvs.sourceforge.net/boost-sandbox/database/
+ library]. On the other hand filling fields with values that aren't going to be
+ used is a waste of resources.
+
+[endsect]
+
+[section:interface The Programming Interface]
+
+[section:connection_parms Connection Parameters]
+
+* _How should parameters to =connection::connect()= be defined?_
+ The current solution of using db, name & password is naive, not necessarily
+ meaningful on all platforms and doesn't allow the specification of
+ additional, platform specific connection parameters. In order to provide
+ support for more parameters there are several possible approaches. One is the
+ use of native connection strings, as used by the different platforms; this is
+ the simplest alternative in terms of implementation, but it isn't very
+ friendly towards developers of cross-dbms solutions.
+ Another alternative is the use of an ad hoc syntax; one interesting candidate
+ is the URL based one used by __sqlalchemy__, a Python DB access /
+ Object-Relational mapping framework.
+ A completely different approach would be to provide parameters as name/value
+ pairs; here however the choice of representation is problematic: is it
+ reasonable to impose the use of a specific container type? I guess not,
+ however using a range of iterators over pairs of strings would imply the use
+ of a template member function, which I'd very much like to avoid; a solution
+ could be the use of some form of polymorphic iterator, but that would mean
+ getting it approved for Boost and eventually the committee.
+
+[endsect]
+
+[section:query_parms Query Parameters]
+
+* _Implement named parameters?_
+ What about technologies that do not support them? I don't like the idea of
+ preprocessing statements' text before passing it to the backend, yet
+ libraries such as SOCI, Borland's VCL and SqlApi++ do provide this
+ functionality.
+
+* Provide value assignment for input parameters?
+
+* Provide binding for output parameters?
+
+[endsect]
+
+[section:result_sets Handling Query Results]
+
+* _How should full rows be represented dynamically?_
+ From a dynamic point of view a row is a sequence of boost/TR1 =any=, but how
+ should that sequence be represented in practice? I'd rather avoid member
+ function templates if possible, but the alternative seems to be to force a
+ specific collection on users.
+
+* _Consider storing result sets for multipass iteration._ Note however that many
+ databases expect buffers in which to store possibly converted values. This may
+ lead to excessive copying. All in all it may be preferable to defer multipass
+ iteration to some library above SqlCli.
+
+[endsect]
+
+[section:diagnostics Diagnostics]
+
+* _How should informative diagnostics for non fatal problems be provided, e.g.
+ field truncation?_
+ One idea is to combine actual values and diagnostic information in a custom
+ return type, which provides access to both by means of conversion operators.
+ This ensures that diagnostic information is "pushed" onto the user, but it is
+ rather cumbersome, especially when the wrapping function is an overloaded
+ operator. However callback oriented mechanisms are even more cumbersome.
+ Providing specific flags in the relevant classes "a la iostreams" appears to
+ be the least of all evils. On the other hand this too has its shortcomings,
+ most notably the fact that the place where to look for errors is not always
+ obvious, nor are the operations that might invalidate an error condition.
+
+[endsect]
+
+[section:sql Representation of SQL Entities]
+
+One area of Boost.SqlCli that is still at a very primitive stage is the
+representation of concepts pertaining to those elements of the SQL language that
+users may need to handle explicitly.
+
+* [_Should SQL data types be made explicit, e.g. by providing an enum, or is it
+ better to keep using only C++ types, e.g. by means of =std::type_info?= (see
+ =boost::sql_cli::column=).]
+ This may become necessary to allow multiple C++ types to map to the same SQL
+ type and to handle portability issues (e.g. sizes of C++ types vs. sizes of
+ SQL types). Moreover the implementation dependence of =std::type_info= makes
+ it a poor choice for an external representation. On the other hand it is not
+ yet clear to me how significant the SQL CLI standard types are for different
+ CLI libraries (eg. Oracle's OCI, PostgreSQL's libpq, etc.).
+ An alternative is to mimick how column types are specified in SQL DDL,
+ possibly by providing an enum for types and integral values for size and
+ precision.
+ * Could Boost.Serialization's strong typedef be useful in this respect?
+
+* Should a way to check that a specific type is supported by the underlying
+ technology be provided?
+
+* More generally, should a way be devised to query the available, possibly
+ technology specific, functionality?
+
+[endsect]
+
+[endsect]
+
+[section:structure Library Structure and Design]
+
+This section describes the portions of the library's internals that still need
+to be clearly outlined.
+
+* _Are there better ways to implement pseudo virtual member function
+ templates?_
+ Should plain virtual member functions be used instead? (see
+ =boost::sql_cli::statement= and =boost::sql_cli::row=).
+ I consider this rather critical, because the template based interface is
+ very convenient and because it would be nice if each backend could support
+ their own specific data types, without forsaking type safety.
+ For the time being dispatching has been factored into the database class.
+
+* [_Does it make sense to use the handle-body idiom for classes that can only be
+ instantiated by factories, e.g. =boost::sql_cli::column=?]
+ Probably yes, as they can be implemented by means of the flyweight pattern and
+ thus be passed by value.
+
+* _Should a plugin oriented architecture be introduced to facilitate the
+ introduction of support for additional technologies?_
+ This really depends on whether the aim is to provide a complete solution to
+ database access for the most popular DBMS's or to define an interface so that
+ DBMS suppliers may implement it.
+ I'm inclined to think that adding support for additional backends should be
+ made as easy as possible, but proper plugins are not really needed.
+
+* _Should fixed size field buffers be supported?_ If so, consider using TR1's
+ arrays. These may come handy for long character fields and blobs, and to
+ prevent unrestrained buffer growth.
+
+* It has been suggested that some sort of "null" backend be provided, where
+ result sets may be filled by hand, for testing purposes. I'm not convinced
+ it is worth the effort, though.
+
+[endsect]
+
+[section:odbc ODBC Specific Issues]
+
+* =odbc::handle= : Cycle on all the available diagnostic records?
+
+* =odbc::connection= : Allocating/deallocating handles in the
+ constructor/destructor favours a RAII approach, but limits the available
+ diagnostics. Is it reasonable? (the same goes for =odbc::environment= and
+ =odbc::statement=)
+
+* =odbc::field= : Are we sure that the column size is always known?
+
+* =odbc::field= : Is it always acceptable to read the whole column in a single
+ step?
+
+* =odbc::field= : Should =SQL_NO_TOTAL= be handled?
+
+[warning =odbc::warning= is currently commented out and doesn't appear likely
+ to resurrect]
+
+* =odbc::warning= : Should it be possible to combine warnings? e.g.
+ * Construct a list
+ * Keep only the last one
+
+[endsect]
+
+[section:environment Environment]
+
+* How do you check for the presence of the test database(s) from within
+ Boost.Test?
+ * Ideally it should be possible to perform the tests on a set of available
+ databases.
+ * Some form of test configuration should be provided.
+
+[endsect]
+
+[section:desiderata Desiderata]
+
+These aren't even open issues, but rather features that would be nice to have.
+
+* Support for multithreading at connection level.
+
+* Connection pooling.
+
+[endsect]
+
+[endsect]

Added: sandbox/sql_cli/libs/sql_cli/doc/readme.txt
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/readme.txt 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,28 @@
+* Boost.SqlCli library ------------------------------------------------------ *
+
+* Copyright Nicola Musatti 2006 - 2007.
+* Use, modification, and distribution are subject to the Boost Software
+* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+* http:www.boost.org/LICENSE_1_0.txt)
+
+* See http:www.boost.org/libs/sql_cli for library home page. ---------------- *
+
+readme.txt - The Boost.SqlCli library
+
+The Boost.SqlCli library is an experiment on how the interface of a future Boost
+database access library might look like. Currently it is in a very early stage
+of development and just about everything is liable of changing beyond
+recognition, starting from the library's name. Some very sketchy documentation -
+a short rationale, a terse reference and a much larger to do / open issues
+section - is available in libs/sql_cli/index.html .
+
+The library is meant to be "dropped" into an existing Boost 1.34 / 1.35
+installation. Project files for Microsoft Visual C++ 2005, Borland C++ Builder
+6 & 2006 and Bloodshed's Dev-C++ (MinGW) are available under the
+libs/sql_cli/build directory.
+
+The library home page mentioned in this and other files' headers is not
+available and might never be; the library is being developed so as to be "Boost
+ready", even if it is not yet clear whether it will ever reach a level of
+quality and scope sufficient to consider official submission to Boost.
+

Added: sandbox/sql_cli/libs/sql_cli/doc/sql_cli.qbk
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/sql_cli.qbk 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,86 @@
+[article Boost.SqlCli
+ [quickbook 1.4]
+ [version 0.2]
+ [authors [Musatti, Nicola]]
+ [copyright 2006 2007 Nicola Musatti]
+ [purpose An informal presentation of the Boost.SqlCli library]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+ [last-revision $Date: 2007/04/23 16:13:13 $]
+]
+
+
+[def __soci__ [@http://soci.sourceforge.net SOCI]]
+[def __cli__ [@http://en.wikipedia.org/wiki/Call_Level_Interface Call Level
+ Interface]]
+
+[section:intro Introduction]
+
+In the spring of 2006 a lively discussion took place on the Boost Developers'
+mailing list about submitting the __soci__ library to Boost as a first step
+towards presenting a proposal to the Standard Committee for an interface to
+relational databases. SOCI is an actively developed open source project that is
+attracting a growing user base, but its current API is significantly different
+from Boost's (and the Committee's) conventions. Boost.SqlCli is an exploration
+of what a more "compliant" API might look like.
+
+Boost.SqlCli aims at providing a C++ __cli__ to SQL systems that feels natural
+to C++ programmers. This is achieved by pursuing several design goals:
+
+* _Abstraction from the underlying technology_:
+ Boost.SqlCli should hide all details of the underling DBMS technology, with
+ the possible exception of
+ * the parameters required to connect to a database
+ * access to product specific extensions to the standard SQL syntax
+
+* _Minimality_:
+ While coverage of SQL features should be as wide as possible, Boost.SqlCli
+ should only provide the minimal functionality required to provide native and
+ standard types' values for query parameters and to retrieve the same types
+ of values from query results. In addition dynamic type handling will be
+ provided by means of boost/TR1 any. Bare bones support for handling composite
+ data will be provided by means of boost/TR1 tuples for the static, type-safe
+ approach and by means of ranges of boost/TR1 any for the dynamic approach.
+
+* _Use of modern, idiomatic C++_
+
+Development is still at a very early stage. The fundamental elements of the
+library's interface are present, but only a subset of the planned scalar data
+types are supported as parameter and field values. Dynamic typing and composite
+data are not available yet. Currently only a very incomplete ODBC backend is
+available. The library has been built with Microsoft Visual C++ 2005, Borland
+C++ Builder 6 & 2006, as well as MinGW G++ 3.4.2, all under Windows.
+
+The documentation contains a currently very incomplete Architecture section,
+which describes the structure of the library and explains why it was done this
+way; a To Do chapter, which lists those work items that have been identified in
+a reasonably clear way; and an Open Issues section, which presents topics over
+which a definite decision hasn't been made or which would be nice to have but
+haven't been planned yet. A Doxygen generated reference is also available.
+
+[section:example A Concrete Example]
+
+This is the =demo.cpp= demo program from the =libs/sql_cli/examples= directory.
+Hopefully it is self explanatory...
+
+[import ../example/demo.cpp]
+
+[demo]
+
+[endsect]
+[endsect]
+
+[include architecture.qbk]
+[include todo.qbk]
+[include open_issues.qbk]
+
+[section:reference Reference]
+
+The Doxygen reference hasn't been integrated in this document yet. You can find
+it [@file:../reference/index.html here].
+
+[endsect]
+

Added: sandbox/sql_cli/libs/sql_cli/doc/todo.qbk
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/doc/todo.qbk 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,100 @@
+[/
+[article Boost.SqlCli - To Do list
+ [quickbook 1.4]
+ [version 0.1]
+ [authors [Musatti, Nicola]]
+ [copyright 2007 Nicola Musatti]
+ [purpose Action items for the development of the Boost.SqlCli library]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+ [last-revision $Date: 2007/04/23 16:13:13 $]
+]
+]
+
+[section:todo Things to Do]
+
+This chapter lists things to do, in contrast with the next one which describes
+decisions to take. Ideally all the following items should be included in the
+next release, but it's quite possible that some of them may lead to further
+unresolved issues, especially since some tasks involve design rather than
+coding.
+
+[section:devel Design and Implementation]
+
+* Revise the architecture of backends so as to make it simpler and more
+ obvious for others to understand what should be done to implement additional
+ backends.
+ * Document the backend API and conventions.
+
+* Add support for date and time fields, using Boost.DateTime as C++ counterpart.
+
+* Identify which additional types for parameters and fields should be supported.
+
+* Support dynamic typing by providing boost/TR1 =any= input parameters and field
+ values.
+
+* Support composite data types / full row handling, both for user convenience
+ and to leverage batch query processing that might be supported by the
+ underlying technology.
+ * Use TR1 =tuple= for static typing.
+ * Is an underlying collection necessary for dynamic typing or are iterators
+ sufficient? In the first case, should =std::vector= be used?
+
+* Support iterative statement composition, e.g. by providing an
+ =add_parameter()= and a parameterless =prepare()= member function to the
+ =statement= class.
+
+* Revise the representation of connection parameters.
+ * Consider using a collection of name/value pairs, to be passed unchanged to
+ the underlying DBMS.
+
+* Add support for stored procedures.
+
+[section:odbc_backend ODBC Backend]
+
+* Revise the use of =traits= and =value_buffer= for =odbc::field=.
+ * Unify the two?
+ * Generalize everything that might be useful to implement other backends.
+
+* Handle iterated value retrieval from ODBC primitives (see
+ =boost::sql_cli::odbc::row=).
+
+[endsect]
+
+[endsect]
+
+[section:environment Environment]
+
+* Replace Dev-C++ with Code::Blocks as g++ IDE. Dev-C++ development appears to
+ have stopped and the IDE hasn't aged well. Code::Blocks appears to be
+ definitely more promising.
+
+* Port to 32 bit Linux.
+
+* Port to 64 bit systems.
+
+[section:tests Tests]
+
+* A mechanism for the repetition of tests over different DBMS.
+ * A local configuration file for the available DBMS's.
+
+[endsect]
+
+[endsect]
+
+[section:doc Documentation]
+
+* User's guide
+
+* Reference manual
+
+* Rationale
+ * With a comparison with other libraries, especially SOCI.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/sql_cli/libs/sql_cli/example/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/example/Jamfile 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,20 @@
+
+subproject libs/sql_cli/example ;
+
+import ../build/odbc ;
+
+rule sql-cli-example ( name extra-sources * )
+{
+ exe $(name)
+ : # sources
+ $(name).cpp
+ <lib>../build/boost_sql_cli
+ <lib>@boost/libs/signals/build/boost_signals
+ <template>odbc
+ : # build requirements
+ <include>$(BOOST_ROOT)
+ ;
+}
+
+sql-cli-example demo ;
+

Added: sandbox/sql_cli/libs/sql_cli/example/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/example/Jamfile.v2 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,11 @@
+# Boost.SqlCli
+#
+# Copyright (c) 2006 - 2007 Nicola Musatti.
+# Distributed under the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+project boost/sql_cli/example
+ ;
+
+exe demo : demo.cpp ../build//boost_sql_cli ;
+

Added: sandbox/sql_cli/libs/sql_cli/example/demo.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/example/demo.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,140 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+//[demo
+// An example of what a Boost database interface library might look like
+
+#include <iostream>
+#include <ostream>
+
+#define BOOST_ALL_DYN_LINK 1
+
+#include <boost/optional.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)
+# pragma hdrstop
+#endif
+
+#include <boost/none.hpp>
+
+#include <boost/sql_cli.hpp>
+
+int main()
+{
+ try
+ {
+
+// Connect to a database, specifying the underlying technology. Unless
+// specific SQL syntax is used, this should be the only place where the
+// actual DBMS product / technology is evident
+
+ boost::sql_cli::connection conn("ODBC");
+ conn.connect("SQL_CLI", "dba", "sql");
+
+// Execute a couple of simple queries
+
+ boost::sql_cli::statement st(conn);
+ try
+ {
+ st.exec("drop table t");
+ conn.commit();
+ }
+ catch ( boost::sql_cli::error & e )
+ {
+ std::cerr << e.what() << '\n';
+ }
+ st.exec("create table t ( a int, b varchar(10), c real, "
+ "d_is_an_incredibly_long_column_name int )");
+
+// Execute a parameterized query
+
+ long a;
+ std::string b;
+ boost::optional<float> c; // a value that may be null
+ boost::sql_cli::null_value<long> d; // a value that is always null
+
+ // prepare the statement and bind input parameters, so get to be able
+ // to execute it in a loop with different values
+
+ st.prepare("insert into t ( a, b, c, "
+ "d_is_an_incredibly_long_column_name ) values ( ?, ?, ?, ? )",
+ a, b, c, d);
+
+ char * nums[] = { "zero", "one", "two", "three", "four", "five", "six",
+ "seven", "eight", "nine" };
+ for ( a = 0; a < 10; ++a )
+ {
+ b = nums[a];
+ if ( a % 2 )
+ c = a * 1.1f;
+ else
+ c = boost::none;
+ st.exec();
+ }
+ conn.commit();
+
+// Execute a query that returns a result set
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+
+ // Explore the structure of the result set
+
+ std::cout << "No. of columns: " << rs.column_count() << '\n';
+ for ( int i = 0; i < rs.column_count(); ++i )
+ {
+ std::cout << rs[i].name() << "\t " << rs[i].type().name() << '(' <<
+ rs[i].size() << ", " << rs[i].precision() << ')';
+ if ( rs[i].nullable() )
+ std::cout << "\t null";
+ std::cout << '\n';
+ }
+
+ // Print the actual results
+
+ std::cout << "\nRows:\n";
+ for ( boost::sql_cli::result_set::iterator i = rs.begin();
+ i != rs.end(); ++i )
+ {
+ boost::sql_cli::row const & r = *i;
+
+ // Columns may be accessed by position...
+
+ std::cout << r[0].get<long>() << "\t ";
+
+ // ...or by name
+
+ std::cout << r["b"].get<std::string>() << "\t ";
+ boost::optional<float> c = r[2].get<boost::optional<float> >();
+ if ( ! c )
+ std::cout << "(null)\t ";
+ else
+ std::cout << *c << "\t ";
+ boost::optional<long> d = r[3].get<boost::optional<long> >();
+ if ( ! d )
+ std::cout << "(null)\n";
+ else
+ std::cout << *d << '\n';
+ }
+ st.exec("drop table t");
+ conn.commit();
+ conn.disconnect();
+ }
+ catch ( boost::sql_cli::error & e )
+ {
+ std::cerr << e.what() << '\n';
+ std::cout << "Failure!\n";
+ return 1;
+ }
+ std::cout << "Success!\n";
+ return 0;
+}
+
+//]
+

Added: sandbox/sql_cli/libs/sql_cli/index.html
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/index.html 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,10 @@
+<html>
+<head>
+<meta http-equiv="refresh" content="0; URL=doc/html/index.html">
+</head>
+<body>
+Automatic redirection failed, please go to
+doc/html/index.html
+<hr>
+</body>
+</html>

Added: sandbox/sql_cli/libs/sql_cli/src/backend.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/backend.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,48 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006 - 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#define BOOST_SQL_CLI_SOURCE
+
+#include <boost/sql_cli/detail/backend.hpp>
+
+#include <boost/sql_cli/odbc/odbc_connection.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace detail
+{
+
+std::map<std::string, backend *> backend::backends;
+
+// Backend How-To: Define a namespace level instance of your backend's
+// 'backend_helper' specialization and initialize it with a unique
+// identification string.
+// Should the default definition of 'backend_helper' be insufficient for some
+// reason, consider providing your own custom specialization here.
+
+backend_helper<odbc_tag> odbc("ODBC");
+
+backend::backend(std::string const & dbms)
+{
+ assert(backends.find(dbms) == backends.end());
+ backends.insert(make_pair(dbms, this));
+}
+
+std::auto_ptr<connection_base> backend::create_connection(std::string const & dbms)
+{
+ std::map<std::string, backend *>::const_iterator i = backends.find(dbms);
+ assert(i != backends.end());
+ return i->second->create_connection();
+}
+
+} // namespace detail
+} // namespace sql_cli
+} // namespace boost

Added: sandbox/sql_cli/libs/sql_cli/src/odbc_column.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/odbc_column.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,54 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <sstream>
+
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/size.hpp>
+
+#include <boost/sql_cli/odbc/odbc_column.hpp>
+#include <boost/sql_cli/odbc/traits.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+#include <boost/sql_cli/detail/value_types.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+template <int n>
+const std::type_info & code_to_typeinfo(int t)
+{
+ using namespace boost::mpl;
+ typedef typename at<detail::value_types, int_<n> >::type
+ type;
+ if ( traits<type>::param_type_id == t )
+ return typeid(type);
+ else
+ return code_to_typeinfo<n+1>(t);
+}
+
+template <>
+const std::type_info & code_to_typeinfo<boost::mpl::size <
+ detail::value_types>::type::value>(int t)
+{
+ std::ostringstream s;
+ s << t << ": Invalid type";
+ throw error(s.str());
+}
+
+const std::type_info & column::type() const
+{
+ return code_to_typeinfo<0>(typ);
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost

Added: sandbox/sql_cli/libs/sql_cli/src/odbc_connection.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/odbc_connection.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,92 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <boost/detail/workaround.hpp>
+
+#include <boost/sql_cli/odbc/odbc_environment.hpp>
+#include <boost/sql_cli/odbc/odbc_connection.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)
+# pragma hdrstop
+#endif
+
+#include <boost/sql_cli/odbc/odbc_statement.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+# pragma warn -8080
+#endif
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+boost::weak_ptr<environment> connection::the_env;
+
+connection::connection() : my_env(the_env.lock())
+{
+ if ( ! my_env )
+ {
+ my_env.reset(new environment);
+ the_env = my_env;
+ }
+ check_return(SQLAllocHandle(kind, my_env->get_handle(),
+ &get_handle()));
+}
+
+// Note that SQLFreeHandle may fail, so freeing the handle in the destructor
+// might not be the best solution
+connection::~connection()
+{
+ try
+ {
+ disconnect();
+ check_return(SQLFreeHandle(kind, get_handle()));
+ }
+ catch ( error & )
+ {
+ // TODO: Decide what to do...
+ }
+}
+
+void connection::connect(const std::string & srv, const std::string & user,
+ const std::string & auth)
+{
+ check_return(SQLConnect(get_handle(), (SQLCHAR *)srv.c_str(), SQL_NTS,
+ (SQLCHAR *)user.c_str(), SQL_NTS, (SQLCHAR *)auth.c_str(),
+ SQL_NTS));
+}
+
+void connection::disconnect()
+{
+ check_return(SQLDisconnect(get_handle()));
+ disc_sig();
+}
+
+void connection::commit()
+{
+ check_return(SQLEndTran(kind, get_handle(), SQL_COMMIT));
+}
+
+void connection::rollback()
+{
+ check_return(SQLEndTran(kind, get_handle(), SQL_ROLLBACK));
+}
+
+std::auto_ptr<sql_cli::detail::statement_base> connection::create_statement()
+{
+ std::auto_ptr<sql_cli::detail::statement_base> s(new statement(*this));
+ return s;
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost

Added: sandbox/sql_cli/libs/sql_cli/src/odbc_environment.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/odbc_environment.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,43 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#define BOOST_SQL_CLI_SOURCE
+
+#include <boost/sql_cli/odbc/odbc_environment.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+environment::environment()
+{
+ std::string msg = "Environment handle allocation error";
+ check_return(SQLAllocHandle(kind, SQL_NULL_HANDLE, &get_handle()), &msg);
+ check_return(SQLSetEnvAttr(get_handle(), SQL_ATTR_ODBC_VERSION,
+ reinterpret_cast<SQLPOINTER>(SQL_OV_ODBC3), 0));
+}
+
+environment::~environment()
+{
+ try
+ {
+ check_return(SQLFreeHandle(kind, get_handle()));
+ }
+ catch ( error & )
+ {
+ // TODO: Decide what to do...
+ }
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost

Added: sandbox/sql_cli/libs/sql_cli/src/odbc_result_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/odbc_result_set.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,113 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <vector>
+
+#include <boost/detail/workaround.hpp>
+
+#include <boost/sql_cli/odbc/odbc_result_set.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)
+# pragma hdrstop
+#endif
+
+#include <boost/sql_cli/odbc/odbc_row.hpp>
+#include <boost/sql_cli/odbc/odbc_statement.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+# pragma warn -8080
+#endif
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+result_set::result_set(statement const & s) : stmt(s)
+{
+ SQLNumResultCols(s.get_handle(), &num_col);
+ if ( num_col == 0 )
+ throw error("No active query");
+ for ( SQLSMALLINT i = 1; i <= num_col; ++i )
+ cols.push_back(create_column(i));
+}
+
+boost::shared_ptr<column> result_set::create_column(int n)
+{
+ typedef std::vector<SQLCHAR> name_type;
+ name_type name(32);
+ SQLSMALLINT nam_len;
+ SQLSMALLINT type;
+ SQLUINTEGER size;
+ SQLSMALLINT prec;
+ SQLSMALLINT nullable;
+ SQLRETURN ret = SQLDescribeCol(stmt.get_handle(),
+ static_cast<SQLSMALLINT>(n), &name[0],
+ static_cast<SQLSMALLINT>(name.size()), &nam_len, &type, &size,
+ &prec, &nullable);
+ if ( ret == SQL_SUCCESS_WITH_INFO &&
+ name.size() < static_cast<name_type::size_type>(nam_len + 1) )
+ {
+ name.resize(nam_len + 1);
+ ret = SQLDescribeCol(stmt.get_handle(), static_cast<SQLSMALLINT>(n),
+ &name[0], static_cast<SQLSMALLINT>(name.size()), &nam_len,
+ &type, &size, &prec, &nullable);
+ }
+ switch(ret)
+ {
+ case SQL_SUCCESS:
+ case SQL_SUCCESS_WITH_INFO:
+ {
+ boost::shared_ptr<column> c(new column((const char *)&name[0],
+ type, size, prec, nullable == SQL_NULLABLE, n));
+ return c;
+ }
+ default:
+ throw error(stmt, ret);
+ }
+}
+
+std::auto_ptr<detail::row_base> result_set::create_row()
+{
+ SQLRETURN ret = SQLFetch(stmt.get_handle());
+
+ switch(ret)
+ {
+ case SQL_SUCCESS:
+ case SQL_SUCCESS_WITH_INFO:
+ case SQL_NO_DATA:
+ {
+ std::auto_ptr<detail::row_base> r;
+ if ( ret == SQL_NO_DATA )
+ {
+ ret = SQLCloseCursor(stmt.get_handle());
+ if ( ret == SQL_SUCCESS_WITH_INFO )
+ {
+ // TODO: Handle warning
+ }
+ else if ( ret != SQL_SUCCESS )
+ {
+ throw error(stmt, ret);
+ }
+ }
+ else
+ r.reset(new row(*this));
+ return r;
+ }
+ default:
+ throw error(stmt, ret);
+ }
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost
+

Added: sandbox/sql_cli/libs/sql_cli/src/odbc_state.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/odbc_state.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,32 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <boost/sql_cli/odbc/odbc_state.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+state src_trunc("01004");
+state frac_trunc("01S07");
+
+bool string_truncated(state const & s)
+{
+ return s == src_trunc;
+}
+
+bool fraction_truncated(state const & s)
+{
+ return s == frac_trunc;
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost

Added: sandbox/sql_cli/libs/sql_cli/src/odbc_statement.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/src/odbc_statement.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,175 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2006. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <boost/bind.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <boost/sql_cli/odbc/odbc_connection.hpp>
+#include <boost/sql_cli/odbc/odbc_result_set.hpp>
+#include <boost/sql_cli/odbc/odbc_error.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x564)
+# pragma hdrstop
+#endif
+
+#include <boost/sql_cli/odbc/odbc_statement.hpp>
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+# pragma warn -8080
+#endif
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace odbc
+{
+
+void statement::conn_check() const
+{
+ if ( ! connected )
+ throw error("Connection unavailable");
+}
+
+statement::statement(connection & c) : connected(false)
+{
+ SQLRETURN ret = SQLAllocHandle(kind, c.get_handle(), &get_handle());
+ if ( ret != SQL_SUCCESS )
+ throw error(*this, ret);
+ disc_slot = c.on_disconnect(boost::bind(&statement::disconnect, this));
+ connected = true;
+}
+
+statement::~statement()
+{
+ if ( connected )
+ SQLFreeHandle(kind, get_handle());
+}
+
+void statement::prepare(std::string const & s)
+{
+ conn_check();
+ SQLRETURN ret = SQLPrepare(get_handle(), (SQLCHAR *)s.c_str(), SQL_NTS);
+
+ switch(ret)
+ {
+ case SQL_SUCCESS:
+ case SQL_SUCCESS_WITH_INFO:
+ {
+ params.clear();
+ params.resize(param_count());
+ }
+ break;
+ default:
+ throw error(*this, ret);
+ }
+}
+
+
+#if BOOST_WORKAROUND(__BORLANDC__, >= 0x582)
+# pragma option push -w-8091
+#endif
+
+void statement::exec()
+{
+ conn_check();
+ for ( params_type::iterator i = params.begin(); i != params.end(); ++i )
+ {
+ if ( (*i)->update() )
+ do_bind_param(*i);
+ }
+ SQLRETURN ret = SQLExecute(get_handle());
+
+/*
+ while ( ret == SQL_NEED_DATA )
+ {
+ SQLPOINTER p;
+ ret = SQLParamData(get_handle(), &p);
+ SQLSMALLINT n;
+ n = reinterpret_cast<SQLSMALLINT>(p) - 1;
+ assert(static_cast<std::size_t>(n) <= soi.size());
+ std::vector<soi_handler>::iterator i = soi.begin() + n;
+ {
+ if ( i->get )
+ {
+
+ ret = SQLPutData(get_handle(), i->get->ptr(),
+ i->get->soi());
+ if ( ret != SQL_SUCCESS && ret != SQL_NEED_DATA )
+ throw error(*this, ret);
+ }
+ }
+ }
+*/
+ switch(ret)
+ {
+ case SQL_SUCCESS:
+ case SQL_SUCCESS_WITH_INFO:
+ break;
+ default:
+ throw error(*this, ret);
+ }
+}
+
+#if BOOST_WORKAROUND(__BORLANDC__, >= 0x582)
+# pragma option pop
+#endif
+
+
+void statement::exec(std::string const & s)
+{
+ conn_check();
+ SQLRETURN ret = SQLExecDirect(get_handle(), (SQLCHAR *)s.c_str(), SQL_NTS);
+
+ switch(ret)
+ {
+ case SQL_SUCCESS:
+ case SQL_SUCCESS_WITH_INFO:
+ break;
+ default:
+ throw error(*this, ret);
+ }
+}
+
+int statement::param_count() const
+{
+ conn_check();
+ SQLSMALLINT n;
+ SQLRETURN ret = SQLNumParams(get_handle(), &n);
+
+ switch(ret)
+ {
+ case SQL_SUCCESS:
+ case SQL_SUCCESS_WITH_INFO:
+ return n;
+ default:
+ throw error(*this, ret);
+ }
+}
+
+void statement::do_bind_param(boost::shared_ptr<param> const & par)
+{
+ conn_check();
+ SQLRETURN ret = SQLBindParameter(get_handle(),
+ static_cast<SQLUSMALLINT>(par->number()), SQL_PARAM_INPUT,
+ par->value_type_id(), par->param_type_id(), 0, 0,
+ par->parameter_value_ptr(), 0, par->strlen_or_indptr());
+ if ( ret != SQL_SUCCESS )
+ throw error(*this, ret);
+}
+
+std::auto_ptr<sql_cli::detail::result_set_base>
+ statement::create_result_set() const
+{
+ std::auto_ptr<sql_cli::detail::result_set_base> s(new result_set(*this));
+ return s;
+}
+
+} // namespace odbc
+} // namespace sql_cli
+} // namespace boost

Added: sandbox/sql_cli/libs/sql_cli/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/Jamfile.v2 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,30 @@
+# Boost.SqlCli
+#
+# Copyright (c) 2006 - 2007 Nicola Musatti.
+# Distributed under the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+rule sql-cli-run ( sources + : args * : input-files * : requirements * )
+{
+ return
+ [ run $(sources) ../build//boost_sql_cli
+ : $(args)
+ : $(input-files)
+ : $(requirements) <toolset>msvc:<asynch-exceptions>on ]
+ ;
+}
+
+test-suite "sql_cli"
+ :
+ [ sql-cli-run trivial_test.cpp ]
+ [ sql-cli-run direct_statements_test.cpp ]
+ [ sql-cli-run prepared_statements_test.cpp ]
+ [ sql-cli-run null_test.cpp ]
+ [ sql-cli-run field_types_test.cpp ]
+ [ sql-cli-run scalar_types_test.cpp ]
+ [ sql-cli-run unsigned_types_test.cpp ]
+ [ sql-cli-run tinyint_test.cpp ]
+ [ sql-cli-run numeric_types_test.cpp ]
+ [ sql-cli-run string_test.cpp ]
+ [ sql-cli-run wide_string_test.cpp ]
+ ;

Added: sandbox/sql_cli/libs/sql_cli/test/direct_statements_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/direct_statements_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,27 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t", "a int, b varchar(10), c double precision");
+ boost::sql_cli::statement st(conn);
+ st.exec("insert into t ( a, b, c ) values ( 1, 'two', 3.0 )");
+ conn.commit();
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/field_types_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/field_types_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,127 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+#include <string>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t",
+ "sc tinyint, "
+ "uc unsigned tinyint, "
+ "ss smallint, "
+ "us unsigned smallint, "
+ "sl int, "
+ "ul unsigned int, "
+ "sll bigint, "
+ "ull unsigned bigint, "
+ "f real, "
+ "d double precision "
+ );
+
+
+ signed char sc = -64;
+ unsigned char uc = 64;
+ signed short ss = -8192;
+ unsigned short us = 8192;
+ signed long sl = -1048576l;
+ unsigned long ul = 1048576ul;
+ signed long long sll = -134217728ll;
+ unsigned long long ull = 134217728ull;
+ float f = 1.1e-20f;
+ double d = -1.1e200;
+
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( "
+ "sc, "
+ "uc, "
+ "ss, "
+ "us, "
+ "sl, "
+ "ul, "
+ "sll, "
+ "ull, "
+ "f, "
+ "d "
+ ") values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )",
+ sc,
+ uc,
+ ss,
+ us,
+ sl,
+ ul,
+ sll,
+ ull,
+ f,
+ d
+ );
+ st.exec();
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+
+ BOOST_CHECK(rs[0].type() == typeid(signed char));
+ BOOST_CHECK(rs[1].type() == typeid(unsigned char));
+ BOOST_CHECK(rs[2].type() == typeid(signed short));
+ BOOST_CHECK(rs[3].type() == typeid(unsigned short));
+ BOOST_CHECK(rs[4].type() == typeid(signed long));
+ BOOST_CHECK(rs[5].type() == typeid(unsigned long));
+ BOOST_CHECK(rs[6].type() == typeid(signed long long));
+ BOOST_CHECK(rs[7].type() == typeid(unsigned long long));
+ BOOST_CHECK(rs[8].type() == typeid(float));
+ BOOST_CHECK(rs[9].type() == typeid(double));
+
+ return 0;
+}
+
+int test2(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t",
+ "s varchar(6), "
+ "w varwchar(6) "
+ );
+
+
+ std::string s("narrow");
+ std::wstring w(L"wide");
+
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( "
+ "s, "
+ "w "
+ ") values ( ?, ? )",
+ s,
+ w
+ );
+ st.exec();
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+
+ BOOST_CHECK(rs[0].type() == typeid(std::string));
+ BOOST_CHECK(rs[1].type() == typeid(std::wstring));
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ ts.subscribe(test2);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/null_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/null_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,90 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+
+#include <boost/optional.hpp>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+struct record
+{
+ record(long aa, char const * bb)
+ {
+ if ( aa % 2 )
+ {
+ a = aa;
+ }
+ else
+ {
+ b = bb;
+ }
+ }
+
+ boost::optional<long> a;
+ boost::optional<std::string> b;
+ boost::sql_cli::null_value<double> c;
+};
+
+char * nums[] = { "zero", "one", "two", "three", "four", "five", "six",
+ "seven", "eight", "nine" };
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t", "a int, b varchar(10), c double precision");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( long l = 0; l < 10; ++l )
+ {
+ data.push_back(record(l, nums[l]));
+ }
+
+ boost::optional<long> a;
+ boost::optional<std::string> b;
+ boost::sql_cli::null_value<double> c;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( a, b, c ) values ( ?, ?, ? )", a, b, c);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ a = dvi->a;
+ b = dvi->b;
+ c = dvi->c;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)[0].get<boost::optional<long> >() == dvi->a );
+ BOOST_CHECK( (*rsi)["b"].get<boost::optional<std::string> >() ==
+ dvi->b );
+ BOOST_CHECK( ! (*rsi)[2].get<boost::optional<double> >() );
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/numeric_types_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/numeric_types_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,88 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+struct record
+{
+ record(
+ float f1,
+ double d1
+ ) :
+ f(f1),
+ d(d1)
+ {
+ }
+
+ float f;
+ double d;
+};
+
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t",
+ "f real, "
+ "d double precision"
+ );
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( int i = 0; i < 10; ++i )
+ {
+ data.push_back(record(
+ static_cast<float>( i + 1.1e-20 ),
+ static_cast<double>( i - 1.1e200 )
+ ));
+ }
+
+ float f;
+ double d;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( f, d ) "
+ "values ( ?, ? )",
+ f,
+ d
+ );
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ f = dvi->f;
+ d = dvi->d;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK(compare( (*rsi)["f"].get<float>(), dvi->f ));
+ BOOST_CHECK(compare( (*rsi)["d"].get<double>(), dvi->d ));
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/prepared_statements_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/prepared_statements_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,77 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+struct record
+{
+ record(long aa, char const * bb, double cc) : a(aa), b(bb), c(cc) {}
+
+ long a;
+ std::string b;
+ double c;
+};
+
+char * nums[] = { "zero", "one", "two", "three", "four", "five", "six",
+ "seven", "eight", "nine" };
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t", "a int, b varchar(10), c double precision");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( long l = 0; l < 10; ++l )
+ {
+ data.push_back(record(l, nums[l], l * 1.1));
+ }
+
+ long a;
+ std::string b;
+ double c;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( a, b, c ) values ( ?, ?, ? )", a, b, c);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ a = dvi->a;
+ b = dvi->b;
+ c = dvi->c;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)[0].get<long>() == dvi->a );
+ BOOST_CHECK( (*rsi)["b"].get<std::string>() == dvi->b );
+ BOOST_CHECK(compare( (*rsi)[2].get<double>(), dvi->c ));
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/scalar_types_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/scalar_types_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,93 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+struct record
+{
+ record(
+ signed short ss1,
+ signed long sl1,
+ signed long long sll1) :
+ ss(ss1),
+ sl(sl1),
+ sll(sll1)
+ {
+ }
+
+ signed short ss;
+ signed long sl;
+ signed long long sll;
+};
+
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t",
+ "ss smallint, "
+ "sl int, "
+ "sll bigint");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( int i = 0; i < 10; ++i )
+ {
+ data.push_back(record(
+ static_cast<signed short>( i - 8192 ),
+ static_cast<signed long>( i - 1048576l ),
+ static_cast<signed long long>( i - 134217728ll ) ));
+ }
+
+ signed short ss;
+ signed long sl;
+ signed long long sll;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( ss, sl, sll) "
+ "values ( ?, ?, ? )",
+ ss,
+ sl,
+ sll);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ ss = dvi->ss;
+ sl = dvi->sl;
+ sll = dvi->sll;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)["ss"].get<signed short>() == dvi->ss );
+ BOOST_CHECK( (*rsi)["sl"].get<signed long>() == dvi->sl );
+ BOOST_CHECK( (*rsi)["sll"].get<signed long long>() == dvi->sll );
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/string_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/string_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,70 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <string>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+char * nums[] = { "zero", "one", "two", "three", "four", "five", "six",
+ "seven", "eight", "nine" };
+
+struct record
+{
+ record(char const * s1) : s(s1)
+ {
+ }
+
+ std::string s;
+};
+
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t", "s varchar(6)");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( int i = 0; i < 10; ++i )
+ {
+ data.push_back(record(nums[i]));
+ }
+
+ std::string s;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( s ) values ( ? )", s);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ s = dvi->s;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)["s"].get<std::string>() == dvi->s );
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/test.hpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/test.hpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,109 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#if ! defined(BOOST_SQL_CLI_TEST_TEST_HPP)
+#define BOOST_SQL_CLI_TEST_TEST_HPP
+
+#include <cmath>
+#include <vector>
+
+#include <boost/function.hpp>
+#include <boost/test/minimal.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/sql_cli.hpp>
+
+namespace boost
+{
+namespace sql_cli
+{
+namespace test
+{
+
+class test_suite
+{
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ typedef boost::function1<int, boost::sql_cli::connection &> func_type;
+#else
+ typedef boost::function<int(boost::sql_cli::connection &)> func_type;
+#endif
+ typedef std::vector<func_type> func_vect;
+
+ public:
+ test_suite() : conn("ODBC")
+ {
+ conn.connect("SQL_CLI", "dba", "sql");
+ }
+
+ void subscribe(func_type f)
+ {
+ funcs.push_back(f);
+ }
+
+ int run()
+ {
+ int res = 0;
+ for ( func_vect::iterator i = funcs.begin(); i != funcs.end(); ++i )
+ {
+ int r = (*i)(conn);
+ if ( r > res )
+ res = r;
+ }
+ return res;
+ }
+
+ private:
+ boost::sql_cli::connection conn;
+ func_vect funcs;
+};
+
+class table
+{
+ public:
+ table(boost::sql_cli::connection & c, std::string const & n,
+ std::string const & desc) :
+ conn(c), stmt(c), name(n)
+ {
+ try
+ {
+ stmt.exec("drop table " + name);
+ conn.commit();
+ }
+ catch ( boost::sql_cli::error & )
+ {
+ }
+ stmt.exec("create table " + name + " ( " + desc + " )");
+ }
+
+ ~table()
+ {
+ stmt.exec("drop table " + name);
+ conn.commit();
+ }
+
+ private:
+ boost::sql_cli::connection & conn;
+ boost::sql_cli::statement stmt;
+ std::string name;
+};
+
+template <typename FloatT>
+bool compare(FloatT first, FloatT second)
+{
+ int e1, e2;
+ std::frexp(first, &e1);
+ std::frexp(second, &e2);
+ return std::abs(first - second) < std::ldexp(0.1, e1 + e2 / 2);
+}
+
+} // namespace test
+} // namespace sql_cli
+} // namespace boost
+
+#endif // ! defined(BOOST_SQL_CLI_TEST_TEST_HPP)
+

Added: sandbox/sql_cli/libs/sql_cli/test/tinyint_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/tinyint_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,75 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+struct record
+{
+ record(signed char sc1, unsigned char uc1) : sc(sc1), uc(uc1)
+ {
+ }
+
+ signed char sc;
+ unsigned char uc;
+};
+
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t", "sc tinyint, uc unsigned tinyint");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( int i = 0; i < 10; ++i )
+ {
+ data.push_back(record(
+ static_cast<signed char>( i - 64 ),
+ static_cast<unsigned char>( i + 64 ) ));
+ }
+
+ signed char sc;
+ unsigned char uc;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( sc, uc ) values ( ?, ? )", sc, uc);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ sc = dvi->sc;
+ uc = dvi->uc;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)["sc"].get<signed char>() == dvi->sc );
+ BOOST_CHECK( (*rsi)["uc"].get<unsigned char>() == dvi->uc );
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/trivial_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/trivial_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,17 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007. Use, modification, and distribution are
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/unsigned_types_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/unsigned_types_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,93 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <cmath>
+#include <iostream>
+#include <ostream>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+struct record
+{
+ record(
+ unsigned short us1,
+ unsigned long ul1,
+ unsigned long long ull1) :
+ us(us1),
+ ul(ul1),
+ ull(ull1)
+ {
+ }
+
+ unsigned short us;
+ unsigned long ul;
+ unsigned long long ull;
+};
+
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t",
+ "us unsigned smallint, "
+ "ul unsigned int, "
+ "ull unsigned bigint");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( int i = 0; i < 10; ++i )
+ {
+ data.push_back(record(
+ static_cast<unsigned short>( i + 8192 ),
+ static_cast<unsigned long>( i + 1048576ul ),
+ static_cast<unsigned long long>( i + 134217728ull ) ));
+ }
+
+ unsigned short us;
+ unsigned long ul;
+ unsigned long long ull;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( us, ul, ull) "
+ "values ( ?, ?, ? )",
+ us,
+ ul,
+ ull);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ us = dvi->us;
+ ul = dvi->ul;
+ ull = dvi->ull;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)["us"].get<unsigned short>() == dvi->us );
+ BOOST_CHECK( (*rsi)["ul"].get<unsigned long>() == dvi->ul );
+ BOOST_CHECK( (*rsi)["ull"].get<unsigned long long>() == dvi->ull );
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}

Added: sandbox/sql_cli/libs/sql_cli/test/wide_string_test.cpp
==============================================================================
--- (empty file)
+++ sandbox/sql_cli/libs/sql_cli/test/wide_string_test.cpp 2008-01-11 17:40:02 EST (Fri, 11 Jan 2008)
@@ -0,0 +1,70 @@
+// Boost.SqlCli library ----------------------------------------------------//
+
+// Copyright Nicola Musatti 2007.
+// Use, modification, and distribution are subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/sql_cli for library home page. ------------//
+
+#include <string>
+
+#include "test.hpp"
+
+using namespace boost::sql_cli::test;
+
+wchar_t * wnums[] = { L"zero", L"one", L"two", L"three", L"four", L"five",
+ L"six", L"seven", L"eight", L"nine" };
+
+struct record
+{
+ record(wchar_t const * w1) : w(w1)
+ {
+ }
+
+ std::wstring w;
+};
+
+
+int test1(boost::sql_cli::connection & conn)
+{
+ table t(conn, "t", "w varwchar(6)");
+
+ typedef std::vector<record> data_vect;
+ data_vect data;
+ for ( int i = 0; i < 10; ++i )
+ {
+ data.push_back(record(wnums[i]));
+ }
+
+ std::wstring w;
+ boost::sql_cli::statement st(conn);
+ st.prepare("insert into t ( w ) values ( ? )", w);
+ for ( data_vect::iterator dvi = data.begin(); dvi != data.end(); ++dvi )
+ {
+ w = dvi->w;
+ st.exec();
+ }
+ conn.commit();
+
+ st.exec("select * from t");
+ boost::sql_cli::result_set rs(st);
+ data_vect::iterator dvi = data.begin();
+ for ( boost::sql_cli::result_set::iterator rsi = rs.begin();
+ rsi != rs.end(); ++rsi )
+ {
+ if ( dvi == data.end() )
+ throw std::runtime_error("Too many rows retrieved");
+ BOOST_CHECK( (*rsi)["w"].get<std::wstring>() == dvi->w );
+ ++dvi;
+ }
+
+ return 0;
+}
+
+int test_main( int, char *[] )
+{
+ test_suite ts;
+ ts.subscribe(test1);
+ return ts.run();
+}


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk