File indexing completed on 2025-02-16 05:12:46
0001 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 0002 <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'> 0003 <head> 0004 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> 0005 <link rel="stylesheet" type="text/css" href="style.css" /> 0006 <title>SOCI</title> 0007 </head> 0008 <body> 0009 <table class="banner" cellpadding="0" cellspacing="0"> 0010 <tr> 0011 <td class="banner_left"> 0012 SOCI - The C++ Database Access Library 0013 </td> 0014 </tr> 0015 </table> 0016 0017 <table class="main"> 0018 <tr> 0019 <td class="main_navigator"> 0020 <p>Home<br /> 0021 <a href="http://sourceforge.net/project/showfiles.php?group_id=121480" target="_blank">Download</a><br /> 0022 <a href="doc/index.html">Documentation</a><br /> 0023 <a href="articles.html">Articles</a><br /> 0024 <a href="people.html">People</a><br /> 0025 <a href="events.html">Events</a><br /> 0026 <a href="links.html">Links</a><br /> 0027 </p> 0028 <a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=121480&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a> 0029 </td> 0030 <td class="main_text"> 0031 <p>SOCI is a database access library 0032 for C++ that makes the illusion of <i>embedding</i> 0033 SQL queries in the regular 0034 C++ code, staying entirely within the Standard C++.</p> 0035 0036 <p>The idea is to provide C++ programmers a way to access SQL 0037 databases in the most natural and intuitive way. If you find existing 0038 libraries too difficult for your needs or just distracting, SOCI can be 0039 a good alternative.</p> 0040 0041 <p>The simplest motivating code example for the SQL query that is supposed 0042 to retrieve a single row is:</p> 0043 <pre> 0044 int id = ...; 0045 string name; 0046 int salary; 0047 0048 <span class="bold">sql << "</span><span class="literal">select name, salary from persons where id = </span><span class="bold">" << id, 0049 into(name), into(salary);</span> 0050 </pre> 0051 0052 <p>and the following benefits from extensive support for object-relational 0053 mapping:</p> 0054 <pre> 0055 int id = ...; 0056 Person p; 0057 0058 <span class="bold">sql << "</span><span class="literal">select first_name, last_name, date_of_birth " 0059 "from persons where id = </span><span class="bold">" << id, 0060 into(p);</span> 0061 </pre> 0062 0063 <p>Integration with STL is also supported:</p> 0064 0065 <pre> 0066 <span class="bold">Rowset<string> rs = (sql.prepare << "</span><span class="literal">select name from persons</span><span class="bold">"); 0067 copy(rs.begin(), rs.end(), ostream_iterator<string>(cout, "\n"));</span> 0068 </pre> 0069 0070 <p>SOCI offers also extensive integration with Boost datatypes (optional, tuple and fusion) and flexible support 0071 for user-defined datatypes.</p> 0072 0073 <p>Even though SOCI is mainly a C++ library, it also allows to use it from other programming languages. Currently the package contains the Ada binding, with more bindings likely to come in the future.</p> 0074 0075 <p>Starting from its 2.0.0 release, SOCI uses the plug-in architecture for 0076 backends - this allows to target various database servers. 0077 Currently (4.0.2), the following database systems are supported:</p> 0078 <ul> 0079 <li>DB2</li> 0080 <li>Firebird</li> 0081 <li>MySQL</li> 0082 <li>ODBC (generic backend)</li> 0083 <li>Oracle</li> 0084 <li>PostgreSQL</li> 0085 <li>SQLite3</li> 0086 </ul> 0087 0088 <p>The intent of the library is to cover as many database technologies as 0089 possible. For this, the project has to rely on volunteer contributions 0090 from other programmers, who have expertise with the existing database 0091 interfaces and would like to help writing dedicated backends.<br /> 0092 If you are interested in participating, please contact the <a 0093 href="people.html">project admin</a>.</p> 0094 0095 <p>The SOCI library is distributed under the terms of the <a 0096 target="_blank" href="http://www.boost.org/LICENSE_1_0.txt">Boost 0097 Software License</a>.</p> 0098 0099 <p>All SOCI downloads are hosted on SourceForge.net servers. The current 0100 stable release (4.0.2) can be downloaded <a href="https://sourceforge.net/p/soci/" target="_blank">here</a>, 0101 and all previous releases are available 0102 <a href="http://sourceforge.net/project/showfiles.php?group_id=121480" target="_blank">here</a>.</p> 0103 0104 <p>The development of SOCI happens on GitHub. All repositories live 0105 under the <a target="_blank" href="http://github.com/organizations/SOCI">SOCI</a> 0106 organization where all Git repositories are available.</p> 0107 0108 <p>The main Git repository with SOCI source code can be cloned with:</p> 0109 <pre> 0110 $ git clone git://github.com/SOCI/soci.git 0111 </pre> 0112 0113 <p>The <a href="https://github.com/SOCI/soci/issues">Issues</a> tracker is open 0114 for bug reports and patches submission.</p> 0115 0116 <p>The best way to contribute to SOCI is to follow the typical GitHub workflow: 0117 fork SOCI, apply your edits and submit <a href="https://github.com/SOCI/soci/pulls">Pull Request</a>. 0118 <br /> Feel free to join SOCI development!</p> 0119 0120 <p>To meet other users, please consider subscribing to the 0121 <a target="_blank" href="https://lists.sourceforge.net/lists/listinfo/soci-users">SOCI-users mailing list</a>. 0122 There is also <a target="_blank" href="https://lists.sourceforge.net/lists/listinfo/soci-devel">SOCI-devel mailing list</a> 0123 available dedicated to development discussions only.</p> 0124 0125 <p>There is also community-driven <a target="_blank" href="https://github.com/SOCI/soci/wiki/">Wiki</a> 0126 and <a target="_blank" href="https://github.com/SOCI/soci/wiki/FAQ">FAQ</a> hosted at GitHub, where everybody 0127 is welcome to contribute.</p> 0128 </td> 0129 </tr> 0130 </table> 0131 0132 <a href="http://github.com/SOCI"><img style="position: absolute; top: 0; right: 0; border: 0;" src="forkus_github.png" alt="Fork us on GitHub"></a> 0133 </body> 0134 </html>