summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-02-01 19:57:18 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-02-01 19:57:18 +0300
commit5fb195c7fa0af6ecaa9d2d85a68e2de01ba30ff4 (patch)
tree835ef757eceb65bb6978096e8a5b86cd86a7b641
parentec090a0330850adfa1b5df4bf1b064f9449678fd (diff)
parent52426a687a63e9cc900a08fe9a5e1584b3acf5d1 (diff)
Merge branch 'libodb-boost' into multi-package
-rw-r--r--libodb-boost/.gitignore25
-rw-r--r--libodb-boost/GPLv2340
-rw-r--r--libodb-boost/INSTALL6
-rw-r--r--libodb-boost/LICENSE20
-rw-r--r--libodb-boost/README20
-rw-r--r--libodb-boost/build/.gitignore3
-rw-r--r--libodb-boost/build/bootstrap.build10
-rw-r--r--libodb-boost/build/export.build9
-rw-r--r--libodb-boost/build/root.build17
-rw-r--r--libodb-boost/buildfile9
-rw-r--r--libodb-boost/manifest21
-rw-r--r--libodb-boost/odb/boost.options10
-rw-r--r--libodb-boost/odb/boost/buildfile93
-rw-r--r--libodb-boost/odb/boost/date-time.options5
-rw-r--r--libodb-boost/odb/boost/date-time/exceptions.cxx37
-rw-r--r--libodb-boost/odb/boost/date-time/exceptions.hxx43
-rw-r--r--libodb-boost/odb/boost/date-time/gregorian-common.options4
-rw-r--r--libodb-boost/odb/boost/date-time/gregorian-mssql.options11
-rw-r--r--libodb-boost/odb/boost/date-time/gregorian-mysql.options11
-rw-r--r--libodb-boost/odb/boost/date-time/gregorian-oracle.options11
-rw-r--r--libodb-boost/odb/boost/date-time/gregorian-pgsql.options11
-rw-r--r--libodb-boost/odb/boost/date-time/gregorian-sqlite.options11
-rw-r--r--libodb-boost/odb/boost/date-time/mssql/gregorian-mapping.hxx15
-rw-r--r--libodb-boost/odb/boost/date-time/mssql/gregorian-traits.hxx68
-rw-r--r--libodb-boost/odb/boost/date-time/mssql/posix-time-mapping.hxx21
-rw-r--r--libodb-boost/odb/boost/date-time/mssql/posix-time-traits.hxx194
-rw-r--r--libodb-boost/odb/boost/date-time/mysql/gregorian-mapping.hxx14
-rw-r--r--libodb-boost/odb/boost/date-time/mysql/gregorian-traits.hxx72
-rw-r--r--libodb-boost/odb/boost/date-time/mysql/posix-time-mapping.hxx19
-rw-r--r--libodb-boost/odb/boost/date-time/mysql/posix-time-traits.hxx238
-rw-r--r--libodb-boost/odb/boost/date-time/oracle/gregorian-mapping.hxx14
-rw-r--r--libodb-boost/odb/boost/date-time/oracle/gregorian-traits.hxx83
-rw-r--r--libodb-boost/odb/boost/date-time/oracle/posix-time-mapping.hxx20
-rw-r--r--libodb-boost/odb/boost/date-time/oracle/posix-time-traits.hxx237
-rw-r--r--libodb-boost/odb/boost/date-time/pgsql/gregorian-mapping.hxx14
-rw-r--r--libodb-boost/odb/boost/date-time/pgsql/gregorian-traits.hxx69
-rw-r--r--libodb-boost/odb/boost/date-time/pgsql/posix-time-mapping.hxx19
-rw-r--r--libodb-boost/odb/boost/date-time/pgsql/posix-time-traits.hxx169
-rw-r--r--libodb-boost/odb/boost/date-time/posix-time-common.options4
-rw-r--r--libodb-boost/odb/boost/date-time/posix-time-mssql.options11
-rw-r--r--libodb-boost/odb/boost/date-time/posix-time-mysql.options11
-rw-r--r--libodb-boost/odb/boost/date-time/posix-time-oracle.options11
-rw-r--r--libodb-boost/odb/boost/date-time/posix-time-pgsql.options11
-rw-r--r--libodb-boost/odb/boost/date-time/posix-time-sqlite.options11
-rw-r--r--libodb-boost/odb/boost/date-time/sqlite/gregorian-mapping.hxx14
-rw-r--r--libodb-boost/odb/boost/date-time/sqlite/gregorian-traits.hxx133
-rw-r--r--libodb-boost/odb/boost/date-time/sqlite/posix-time-mapping.hxx19
-rw-r--r--libodb-boost/odb/boost/date-time/sqlite/posix-time-traits.hxx238
-rw-r--r--libodb-boost/odb/boost/details/build2/config-stub.h5
-rw-r--r--libodb-boost/odb/boost/details/build2/config-vc-stub.h5
-rw-r--r--libodb-boost/odb/boost/details/build2/config-vc.h15
-rw-r--r--libodb-boost/odb/boost/details/build2/config.h17
-rw-r--r--libodb-boost/odb/boost/details/config-vc.h5
-rw-r--r--libodb-boost/odb/boost/details/config.h.in12
-rw-r--r--libodb-boost/odb/boost/details/config.hxx21
-rw-r--r--libodb-boost/odb/boost/details/export.hxx78
-rw-r--r--libodb-boost/odb/boost/exception.hxx28
-rw-r--r--libodb-boost/odb/boost/lazy-ptr.hxx9
-rw-r--r--libodb-boost/odb/boost/multi-index.options7
-rw-r--r--libodb-boost/odb/boost/multi-index/container-traits.hxx215
-rw-r--r--libodb-boost/odb/boost/optional.options7
-rw-r--r--libodb-boost/odb/boost/optional/wrapper-traits.hxx63
-rw-r--r--libodb-boost/odb/boost/smart-ptr.options19
-rw-r--r--libodb-boost/odb/boost/smart-ptr/lazy-pointer-traits.hxx61
-rw-r--r--libodb-boost/odb/boost/smart-ptr/lazy-ptr.hxx269
-rw-r--r--libodb-boost/odb/boost/smart-ptr/lazy-ptr.ixx675
-rw-r--r--libodb-boost/odb/boost/smart-ptr/lazy-ptr.txx43
-rw-r--r--libodb-boost/odb/boost/smart-ptr/pointer-traits.hxx110
-rw-r--r--libodb-boost/odb/boost/smart-ptr/wrapper-traits.hxx64
-rw-r--r--libodb-boost/odb/boost/unordered.options7
-rw-r--r--libodb-boost/odb/boost/unordered/container-traits.hxx275
-rw-r--r--libodb-boost/odb/boost/uuid.options4
-rw-r--r--libodb-boost/odb/boost/uuid/mssql/uuid-mapping.hxx22
-rw-r--r--libodb-boost/odb/boost/uuid/mssql/uuid-traits.hxx65
-rw-r--r--libodb-boost/odb/boost/uuid/mysql/uuid-mapping.hxx22
-rw-r--r--libodb-boost/odb/boost/uuid/mysql/uuid-traits.hxx81
-rw-r--r--libodb-boost/odb/boost/uuid/oracle/uuid-mapping.hxx22
-rw-r--r--libodb-boost/odb/boost/uuid/oracle/uuid-traits.hxx77
-rw-r--r--libodb-boost/odb/boost/uuid/pgsql/uuid-mapping.hxx22
-rw-r--r--libodb-boost/odb/boost/uuid/pgsql/uuid-traits.hxx70
-rw-r--r--libodb-boost/odb/boost/uuid/sqlite/uuid-mapping.hxx22
-rw-r--r--libodb-boost/odb/boost/uuid/sqlite/uuid-traits.hxx81
-rw-r--r--libodb-boost/odb/boost/uuid/uuid-common.options4
-rw-r--r--libodb-boost/odb/boost/uuid/uuid-mssql.options11
-rw-r--r--libodb-boost/odb/boost/uuid/uuid-mysql.options11
-rw-r--r--libodb-boost/odb/boost/uuid/uuid-oracle.options11
-rw-r--r--libodb-boost/odb/boost/uuid/uuid-pgsql.options11
-rw-r--r--libodb-boost/odb/boost/uuid/uuid-sqlite.options11
-rw-r--r--libodb-boost/odb/boost/version-build2-stub.hxx4
-rw-r--r--libodb-boost/odb/boost/version-build2.hxx0
-rw-r--r--libodb-boost/odb/boost/version-build2.hxx.in46
-rw-r--r--libodb-boost/odb/boost/version.hxx55
-rw-r--r--libodb-boost/odb/boost/version.options12
-rw-r--r--libodb-boost/tests/.gitignore1
-rw-r--r--libodb-boost/tests/basics/buildfile6
-rw-r--r--libodb-boost/tests/basics/driver.cxx22
-rw-r--r--libodb-boost/tests/build/.gitignore3
-rw-r--r--libodb-boost/tests/build/bootstrap.build8
-rw-r--r--libodb-boost/tests/build/root.build23
-rw-r--r--libodb-boost/tests/buildfile4
100 files changed, 5197 insertions, 0 deletions
diff --git a/libodb-boost/.gitignore b/libodb-boost/.gitignore
new file mode 100644
index 0000000..1c363a0
--- /dev/null
+++ b/libodb-boost/.gitignore
@@ -0,0 +1,25 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.i.*
+*.ii
+*.ii.*
+*.o
+*.obj
+*.gcm
+*.pcm
+*.ifc
+*.so
+*.dylib
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
diff --git a/libodb-boost/GPLv2 b/libodb-boost/GPLv2
new file mode 100644
index 0000000..3912109
--- /dev/null
+++ b/libodb-boost/GPLv2
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/libodb-boost/INSTALL b/libodb-boost/INSTALL
new file mode 100644
index 0000000..5c67dce
--- /dev/null
+++ b/libodb-boost/INSTALL
@@ -0,0 +1,6 @@
+The easiest way to build this package is with the bpkg package manager:
+
+$ bpkg build libodb-boost
+
+But if you don't want to use the package manager, then you can also build it
+manually using the standard build2 build system.
diff --git a/libodb-boost/LICENSE b/libodb-boost/LICENSE
new file mode 100644
index 0000000..9d92da1
--- /dev/null
+++ b/libodb-boost/LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2009-2024 Code Synthesis Tools CC.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License version 2 as
+published by the Free Software Foundation.
+
+For more information on ODB licensing as well as for answers to
+some of the common licensing questions, visit the ODB License
+page:
+
+http://www.codesynthesis.com/products/odb/license.xhtml
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/libodb-boost/README b/libodb-boost/README
new file mode 100644
index 0000000..7ad79b8
--- /dev/null
+++ b/libodb-boost/README
@@ -0,0 +1,20 @@
+ODB is an object-relational mapping (ORM) system for C++. It provides
+tools, APIs, and library support that allow you to persist C++ objects
+to a relational database (RDBMS) without having to deal with tables,
+columns, or SQL and without manually writing any of the mapping code.
+For more information see:
+
+http://www.codesynthesis.com/products/odb/
+
+This package contains the Boost ODB profile library. The Boost profile
+provides support for persisting Boost smart pointers, containers, and
+value types with the ODB system.
+
+See the NEWS file for the user-visible changes from the previous release.
+
+See the LICENSE file for distribution conditions.
+
+See the INSTALL file for prerequisites and installation instructions.
+
+Send questions, bug reports, or any other feedback to the
+odb-users@codesynthesis.com mailing list.
diff --git a/libodb-boost/build/.gitignore b/libodb-boost/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/libodb-boost/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/libodb-boost/build/bootstrap.build b/libodb-boost/build/bootstrap.build
new file mode 100644
index 0000000..1adfcd3
--- /dev/null
+++ b/libodb-boost/build/bootstrap.build
@@ -0,0 +1,10 @@
+# file : build/bootstrap.build
+# license : GNU GPL v2; see accompanying LICENSE file
+
+project = libodb-boost
+
+using version
+using config
+using dist
+using test
+using install
diff --git a/libodb-boost/build/export.build b/libodb-boost/build/export.build
new file mode 100644
index 0000000..27e02dd
--- /dev/null
+++ b/libodb-boost/build/export.build
@@ -0,0 +1,9 @@
+# file : build/export.build
+# license : GNU GPL v2; see accompanying LICENSE file
+
+$out_root/
+{
+ include odb/boost/
+}
+
+export $out_root/odb/boost/lib{odb-boost}
diff --git a/libodb-boost/build/root.build b/libodb-boost/build/root.build
new file mode 100644
index 0000000..882047d
--- /dev/null
+++ b/libodb-boost/build/root.build
@@ -0,0 +1,17 @@
+# file : build/root.build
+# license : GNU GPL v2; see accompanying LICENSE file
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+ixx{*}: extension = ixx
+txx{*}: extension = txx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
diff --git a/libodb-boost/buildfile b/libodb-boost/buildfile
new file mode 100644
index 0000000..8a0d6d9
--- /dev/null
+++ b/libodb-boost/buildfile
@@ -0,0 +1,9 @@
+# file : buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+./: {*/ -build/} doc{INSTALL NEWS README} legal{LICENSE} manifest
+
+# Don't install tests or the INSTALL file.
+#
+tests/: install = false
+doc{INSTALL}@./: install = false
diff --git a/libodb-boost/manifest b/libodb-boost/manifest
new file mode 100644
index 0000000..9f5da05
--- /dev/null
+++ b/libodb-boost/manifest
@@ -0,0 +1,21 @@
+: 1
+name: libodb-boost
+version: 2.5.0-b.26.z
+project: odb
+summary: Boost ODB profile library
+license: GPL-2.0-only
+license: other: proprietary ; Not free/open source.
+topics: C++, ORM, Boost, SQL
+description-file: README
+changes-file: NEWS
+url: https://www.codesynthesis.com/products/odb/
+doc-url: https://www.codesynthesis.com/products/odb/doc/manual.xhtml
+src-url: https://git.codesynthesis.com/cgit/odb/libodb-boost/
+email: odb-users@codesynthesis.com
+build-warning-email: odb-builds@codesynthesis.com
+builds: all
+requires: c++11
+requires: libboost ; Requires not yet packaged libboost.
+depends: * build2 >= 0.16.0-
+depends: * bpkg >= 0.16.0-
+depends: libodb [2.5.0-b.26.1 2.5.0-b.27)
diff --git a/libodb-boost/odb/boost.options b/libodb-boost/odb/boost.options
new file mode 100644
index 0000000..bf8796e
--- /dev/null
+++ b/libodb-boost/odb/boost.options
@@ -0,0 +1,10 @@
+# file : odb/boost.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/smart-ptr
+--profile boost/optional
+--profile boost/unordered
+--profile boost/date-time
+--profile boost/multi-index
+--profile boost/uuid
+
diff --git a/libodb-boost/odb/boost/buildfile b/libodb-boost/odb/boost/buildfile
new file mode 100644
index 0000000..751b56e
--- /dev/null
+++ b/libodb-boost/odb/boost/buildfile
@@ -0,0 +1,93 @@
+# file : odb/boost/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+../
+{
+ define options: file
+ options{*}: extension = options
+
+ # Install into the odb/boost/ subdirectory of, say, /usr/include/
+ # recreating subdirectories.
+ #
+ {hxx ixx txx options}{*}:
+ {
+ install = include/odb/
+ install.subdirs = true
+ }
+
+ boost/
+ {
+ import int_libs = libodb%lib{odb}
+ imp_libs =
+
+ lib{odb-boost}: {hxx ixx txx cxx}{** -version-build2} {hxx}{version-build2} \
+ details/build2/{h}{*} \
+ options{**} ../options{boost} \
+ $imp_libs $int_libs
+
+ # Include the generated version header into the distribution (so that we
+ # don't pick up an installed one) and don't remove it when cleaning in src
+ # (so that clean results in a state identical to distributed).
+ #
+ hxx{version-build2}: in{version-build2} $src_root/manifest
+ hxx{version-build2}:
+ {
+ dist = true
+ clean = ($src_root != $out_root)
+ }
+
+ # For pre-releases use the complete version to make sure they cannot be
+ # used in place of another pre-release or the final version. See the
+ # version module for details on the version.* variable values.
+ #
+ if $version.pre_release
+ lib{odb-boost}: bin.lib.version = @"-$version.project_id"
+ else
+ lib{odb-boost}: bin.lib.version = @"-$version.major.$version.minor"
+
+ # Build options.
+ #
+ cxx.poptions =+ "-I$out_root" "-I$src_root" -DLIBODB_BOOST_BUILD2
+
+ obja{*}: cxx.poptions += -DLIBODB_BOOST_STATIC_BUILD
+ objs{*}: cxx.poptions += -DLIBODB_BOOST_SHARED_BUILD
+
+ # Export options.
+ #
+ lib{odb-boost}:
+ {
+ cxx.export.poptions = "-I$out_root" "-I$src_root" -DLIBODB_BOOST_BUILD2
+ cxx.export.libs = $int_libs
+ }
+
+ liba{odb-boost}: cxx.export.poptions += -DLIBODB_BOOST_STATIC
+ libs{odb-boost}: cxx.export.poptions += -DLIBODB_BOOST_SHARED
+
+ # Installation tweaks.
+ #
+ install_include = [dir_path] include/odb/boost/
+
+ # We want these to be picked up whether LIBODB_BOOST_BUILD2 is defined or
+ # not.
+ #
+ hxx{version}@./: install = false
+ hxx{version-build2}: install = $install_include/version.hxx
+ hxx{version-build2-stub}@./: install = $install_include/version-build2.hxx
+
+ details/build2/
+ {
+ h{*}: install = false
+
+ if ($cxx.target.system == 'win32-msvc')
+ {
+ h{config-vc}@./: install = $install_include/details/
+ h{config-vc-stub}@./: install = $install_include/details/build2/config-vc.h
+ }
+ else
+ {
+ h{config}@./: install = $install_include/details/
+ h{config-stub}@./: install = $install_include/details/build2/config.h
+ }
+ }
+ }
+}
diff --git a/libodb-boost/odb/boost/date-time.options b/libodb-boost/odb/boost/date-time.options
new file mode 100644
index 0000000..a3bd489
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time.options
@@ -0,0 +1,5 @@
+# file : odb/boost/date-time.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/date-time/gregorian
+--profile boost/date-time/posix-time
diff --git a/libodb-boost/odb/boost/date-time/exceptions.cxx b/libodb-boost/odb/boost/date-time/exceptions.cxx
new file mode 100644
index 0000000..3ba8132
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/exceptions.cxx
@@ -0,0 +1,37 @@
+// file : odb/boost/date-time/exceptions.cxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace boost
+ {
+ namespace date_time
+ {
+ const char* special_value::
+ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "unrepresentable date/time special value";
+ }
+
+ special_value* special_value::
+ clone () const
+ {
+ return new special_value (*this);
+ }
+
+ const char* value_out_of_range::
+ what () const ODB_NOTHROW_NOEXCEPT
+ {
+ return "date/time value out of range";
+ }
+
+ value_out_of_range* value_out_of_range::
+ clone () const
+ {
+ return new value_out_of_range (*this);
+ }
+ }
+ }
+}
diff --git a/libodb-boost/odb/boost/date-time/exceptions.hxx b/libodb-boost/odb/boost/date-time/exceptions.hxx
new file mode 100644
index 0000000..321f8da
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/exceptions.hxx
@@ -0,0 +1,43 @@
+// file : odb/boost/date-time/exceptions.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_EXCEPTIONS_HXX
+#define ODB_BOOST_DATE_TIME_EXCEPTIONS_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+
+#include <odb/boost/exception.hxx>
+#include <odb/boost/details/export.hxx>
+
+namespace odb
+{
+ namespace boost
+ {
+ namespace date_time
+ {
+ struct LIBODB_BOOST_EXPORT special_value: exception
+ {
+ virtual const char*
+ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual special_value*
+ clone () const;
+ };
+
+ struct LIBODB_BOOST_EXPORT value_out_of_range: exception
+ {
+ virtual const char*
+ what () const ODB_NOTHROW_NOEXCEPT;
+
+ virtual value_out_of_range*
+ clone () const;
+ };
+ }
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_EXCEPTIONS_HXX
diff --git a/libodb-boost/odb/boost/date-time/gregorian-common.options b/libodb-boost/odb/boost/date-time/gregorian-common.options
new file mode 100644
index 0000000..dfb0b87
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/gregorian-common.options
@@ -0,0 +1,4 @@
+# file : odb/boost/date-time/gregorian-common.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
diff --git a/libodb-boost/odb/boost/date-time/gregorian-mssql.options b/libodb-boost/odb/boost/date-time/gregorian-mssql.options
new file mode 100644
index 0000000..971d19d
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/gregorian-mssql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/gregorian-mssql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/mssql/gregorian-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/mssql/gregorian-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/gregorian-mysql.options b/libodb-boost/odb/boost/date-time/gregorian-mysql.options
new file mode 100644
index 0000000..927dc70
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/gregorian-mysql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/gregorian-mysql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/mysql/gregorian-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/mysql/gregorian-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/gregorian-oracle.options b/libodb-boost/odb/boost/date-time/gregorian-oracle.options
new file mode 100644
index 0000000..fca3670
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/gregorian-oracle.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/gregorian-oracle.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/oracle/gregorian-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/oracle/gregorian-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/gregorian-pgsql.options b/libodb-boost/odb/boost/date-time/gregorian-pgsql.options
new file mode 100644
index 0000000..bf6726a
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/gregorian-pgsql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/gregorian-pgsql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/pgsql/gregorian-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/pgsql/gregorian-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/gregorian-sqlite.options b/libodb-boost/odb/boost/date-time/gregorian-sqlite.options
new file mode 100644
index 0000000..355791c
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/gregorian-sqlite.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/gregorian-sqlite.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/sqlite/gregorian-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/sqlite/gregorian-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/mssql/gregorian-mapping.hxx b/libodb-boost/odb/boost/date-time/mssql/gregorian-mapping.hxx
new file mode 100644
index 0000000..9c64542
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mssql/gregorian-mapping.hxx
@@ -0,0 +1,15 @@
+// file : odb/boost/date-time/mssql/gregorian-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_MAPPING_HXX
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+// By default map boost::gregorian::date to SQL Server DATE (available
+// only since SQL Server 2008). We use the NULL value to represent
+// not_a_date_time.
+//
+#pragma db value(boost::gregorian::date) type("DATE") null
+
+#endif // ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/mssql/gregorian-traits.hxx b/libodb-boost/odb/boost/date-time/mssql/gregorian-traits.hxx
new file mode 100644
index 0000000..b2b9a16
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mssql/gregorian-traits.hxx
@@ -0,0 +1,68 @@
+// file : odb/boost/date-time/mssql/gregorian-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+#include <odb/core.hxx>
+#include <odb/mssql/traits.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace mssql
+ {
+ template <>
+ class default_value_traits< ::boost::gregorian::date, id_date>
+ {
+ public:
+ typedef ::boost::gregorian::date value_type;
+ typedef value_type query_type;
+ typedef date image_type;
+
+ static void
+ set_value (value_type& v, const date& i, bool is_null)
+ {
+ if (is_null)
+ v = value_type (::boost::date_time::not_a_date_time);
+ else
+ v = value_type (static_cast<value_type::year_type> (i.year),
+ static_cast<value_type::month_type> (i.month),
+ static_cast<value_type::day_type> (i.day));
+ }
+
+ static void
+ set_image (date& i, bool& is_null, const value_type& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+ i.year = static_cast<SQLSMALLINT> (v.year ());
+ i.month = static_cast<SQLUSMALLINT> (v.month ());
+ i.day = static_cast<SQLUSMALLINT> (v.day ());
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::gregorian::date>
+ {
+ static const database_type_id db_type_id = id_date;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_MSSQL_GREGORIAN_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/mssql/posix-time-mapping.hxx b/libodb-boost/odb/boost/date-time/mssql/posix-time-mapping.hxx
new file mode 100644
index 0000000..0682dda
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mssql/posix-time-mapping.hxx
@@ -0,0 +1,21 @@
+// file : odb/boost/date-time/mssql/posix-time-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_MAPPING_HXX
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+// By default map boost::posix_time::ptime to SQL Server DATETIME2
+// (available only since SQL Server 2008). We use the NULL value to
+// represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::ptime) type("DATETIME2") null
+
+// By default map boost::posix_time::time_duration to SQL Server TIME
+// (available only since SQL Server 2008). We use the NULL value to
+// represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::time_duration) type("TIME") null
+
+#endif // ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/mssql/posix-time-traits.hxx b/libodb-boost/odb/boost/date-time/mssql/posix-time-traits.hxx
new file mode 100644
index 0000000..88d0c82
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mssql/posix-time-traits.hxx
@@ -0,0 +1,194 @@
+// file : odb/boost/date-time/mssql/posix-time-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+#include <odb/core.hxx>
+#include <odb/mssql/traits.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace mssql
+ {
+ template <>
+ class default_value_traits< ::boost::posix_time::ptime, id_datetime>
+ {
+ public:
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ::boost::gregorian::date date;
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef datetime image_type;
+
+ static void
+ set_value (ptime& v, const datetime& i, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ {
+ unsigned long long fract_s (i.fraction);
+ fract_s = fract_s * time_duration::ticks_per_second () /
+ 1000000000ULL;
+
+ v = ptime (
+ date (static_cast<date::year_type> (i.year),
+ static_cast<date::month_type> (i.month),
+ static_cast<date::day_type> (i.day)),
+ time_duration (
+ static_cast<time_duration::hour_type> (i.hour),
+ static_cast<time_duration::min_type> (i.minute),
+ static_cast<time_duration::sec_type> (i.second),
+ static_cast<time_duration::fractional_seconds_type> (fract_s)));
+ }
+ }
+
+ static void
+ set_image (datetime& i, unsigned short s, bool& is_null, const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ const date& d (v.date ());
+ const time_duration& t (v.time_of_day ());
+
+ is_null = false;
+ i.year = static_cast<SQLSMALLINT> (d.year ());
+ i.month = static_cast<SQLUSMALLINT> (d.month ());
+ i.day = static_cast<SQLUSMALLINT> (d.day ());
+ i.hour = static_cast<SQLUSMALLINT> (t.hours ());
+ i.minute = static_cast<SQLUSMALLINT> (t.minutes ());
+
+ // Scale value 8 indicates we are dealing with SMALLDATETIME
+ // which has the minutes precision.
+ //
+ if (s != 8)
+ {
+ i.second = static_cast<SQLUSMALLINT> (t.seconds ());
+
+ unsigned long long ns (t.fractional_seconds ());
+ ns = ns * 1000000000ULL / time_duration::ticks_per_second ();
+
+ const unsigned int divider[8] =
+ {
+ 1000000000,
+ 100000000,
+ 10000000,
+ 1000000,
+ 100000,
+ 10000,
+ 1000,
+ 100
+ };
+
+ i.fraction = static_cast<SQLUINTEGER> (ns - ns % divider[s]);
+ }
+ else
+ {
+ i.second = 0;
+ i.fraction = 0;
+ }
+ }
+ }
+ };
+
+ template <>
+ class default_value_traits< ::boost::posix_time::time_duration, id_time>
+ {
+ public:
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef time_duration value_type;
+ typedef time_duration query_type;
+ typedef time image_type;
+
+ static void
+ set_value (time_duration& v, const time& i, bool is_null)
+ {
+ if (is_null)
+ v = time_duration (::boost::date_time::not_a_date_time);
+ else
+ {
+ unsigned long long fract_s (i.fraction);
+ fract_s = fract_s * time_duration::ticks_per_second () /
+ 1000000000ULL;
+
+ v = time_duration (
+ static_cast<time_duration::hour_type> (i.hour),
+ static_cast<time_duration::min_type> (i.minute),
+ static_cast<time_duration::sec_type> (i.second),
+ static_cast<time_duration::fractional_seconds_type> (fract_s));
+ }
+ }
+
+ static void
+ set_image (time& i,
+ unsigned short s,
+ bool& is_null,
+ const time_duration& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else if (v.is_negative () || v.hours () > 23)
+ throw odb::boost::date_time::value_out_of_range ();
+ else
+ {
+ is_null = false;
+ i.hour = static_cast<SQLUSMALLINT> (v.hours ());
+ i.minute = static_cast<SQLUSMALLINT> (v.minutes ());
+ i.second = static_cast<SQLUSMALLINT> (v.seconds ());
+
+ unsigned long long ns (v.fractional_seconds ());
+ ns = ns * 1000000000ULL / time_duration::ticks_per_second ();
+
+ const unsigned int divider[8] =
+ {
+ 1000000000,
+ 100000000,
+ 10000000,
+ 1000000,
+ 100000,
+ 10000,
+ 1000,
+ 100
+ };
+
+ i.fraction = static_cast<SQLUINTEGER> (ns - ns % divider[s]);
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::ptime>
+ {
+ static const database_type_id db_type_id = id_datetime;
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::time_duration>
+ {
+ static const database_type_id db_type_id = id_time;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_MSSQL_POSIX_TIME_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/mysql/gregorian-mapping.hxx b/libodb-boost/odb/boost/date-time/mysql/gregorian-mapping.hxx
new file mode 100644
index 0000000..9d23274
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mysql/gregorian-mapping.hxx
@@ -0,0 +1,14 @@
+// file : odb/boost/date-time/mysql/gregorian-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+// By default map boost::gregorian::date to MySQL DATE. We use the
+// NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::gregorian::date) type("DATE") null
+
+#endif // ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/mysql/gregorian-traits.hxx b/libodb-boost/odb/boost/date-time/mysql/gregorian-traits.hxx
new file mode 100644
index 0000000..6b29dc5
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mysql/gregorian-traits.hxx
@@ -0,0 +1,72 @@
+// file : odb/boost/date-time/mysql/gregorian-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+#include <odb/core.hxx>
+#include <odb/mysql/traits.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace mysql
+ {
+ template <>
+ struct default_value_traits< ::boost::gregorian::date, id_date>
+ {
+ typedef ::boost::gregorian::date date;
+ typedef date value_type;
+ typedef date query_type;
+ typedef MYSQL_TIME image_type;
+
+ static void
+ set_value (date& v, const MYSQL_TIME& i, bool is_null)
+ {
+ if (is_null)
+ v = date (::boost::date_time::not_a_date_time);
+ else
+ v = date (i.year, i.month, i.day);
+ }
+
+ static void
+ set_image (MYSQL_TIME& i, bool& is_null, const date& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+ i.neg = false;
+ i.year = v.year ();
+ i.month = v.month ();
+ i.day = v.day ();
+
+ i.hour = 0;
+ i.minute = 0;
+ i.second = 0;
+ i.second_part = 0;
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::gregorian::date>
+ {
+ static const database_type_id db_type_id = id_date;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_MYSQL_GREGORIAN_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/mysql/posix-time-mapping.hxx b/libodb-boost/odb/boost/date-time/mysql/posix-time-mapping.hxx
new file mode 100644
index 0000000..f3908b3
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mysql/posix-time-mapping.hxx
@@ -0,0 +1,19 @@
+// file : odb/boost/date-time/mysql/posix-time-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+// By default map boost::posix_time::ptime to MySQL DATETIME. We use
+// the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::ptime) type("DATETIME") null
+
+// By default map boost::posix_time::time_duration to MySQL TIME. We
+// use the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::time_duration) type("TIME") null
+
+#endif // ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/mysql/posix-time-traits.hxx b/libodb-boost/odb/boost/date-time/mysql/posix-time-traits.hxx
new file mode 100644
index 0000000..28c42c1
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/mysql/posix-time-traits.hxx
@@ -0,0 +1,238 @@
+// file : odb/boost/date-time/mysql/posix-time-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <cstdlib> // std::abs
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+#include <odb/core.hxx>
+#include <odb/mysql/traits.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace mysql
+ {
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_datetime>
+ {
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ::boost::gregorian::date date;
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef MYSQL_TIME image_type;
+
+ static void
+ set_value (ptime& v, const MYSQL_TIME& i, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ {
+ // Since MySQL 5.6.4, the microseconds part is no longer ignored.
+ //
+ unsigned long long fract_s (i.second_part);
+ fract_s = fract_s * time_duration::ticks_per_second () / 1000000ULL;
+
+ v = ptime (
+ date (i.year, i.month, i.day),
+ time_duration (
+ i.hour,
+ i.minute,
+ i.second,
+ static_cast<time_duration::fractional_seconds_type> (fract_s)));
+ }
+ }
+
+ static void
+ set_image (MYSQL_TIME& i, bool& is_null, const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+ i.neg = false;
+
+ const date& d (v.date ());
+ i.year = d.year ();
+ i.month = d.month ();
+ i.day = d.day ();
+
+ const time_duration& t (v.time_of_day ());
+ i.hour = t.hours ();
+ i.minute = t.minutes ();
+ i.second = t.seconds ();
+
+ unsigned long long ms (t.fractional_seconds ());
+ ms = ms * 1000000ULL / time_duration::ticks_per_second ();
+ i.second_part = static_cast<unsigned long> (ms);
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_timestamp>
+ {
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ::boost::gregorian::date date;
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef MYSQL_TIME image_type;
+
+ static void
+ set_value (ptime& v, const MYSQL_TIME& i, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ {
+ // Since MySQL 5.6.4, the microseconds part is no longer ignored.
+ //
+ unsigned long long fract_s (i.second_part);
+ fract_s = fract_s * time_duration::ticks_per_second () / 1000000ULL;
+
+ v = ptime (
+ date (i.year, i.month, i.day),
+ time_duration (
+ i.hour,
+ i.minute,
+ i.second,
+ static_cast<time_duration::fractional_seconds_type> (fract_s)));
+ }
+ }
+
+ static void
+ set_image (MYSQL_TIME& i, bool& is_null, const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else if (v < ptime (date (1970, ::boost::date_time::Jan, 1),
+ time_duration (0, 0, 1)) ||
+ v > ptime (date (2038, ::boost::date_time::Jan, 19),
+ time_duration (3, 14, 7)))
+ throw odb::boost::date_time::value_out_of_range ();
+ else
+ {
+ is_null = false;
+ i.neg = false;
+
+ const date& d (v.date ());
+ i.year = d.year ();
+ i.month = d.month ();
+ i.day = d.day ();
+
+ const time_duration& t (v.time_of_day ());
+ i.hour = t.hours ();
+ i.minute = t.minutes ();
+ i.second = t.seconds ();
+
+ unsigned long long ms (t.fractional_seconds ());
+ ms = ms * 1000000ULL / time_duration::ticks_per_second ();
+ i.second_part = static_cast<unsigned long> (ms);
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::posix_time::time_duration, id_time>
+ {
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef time_duration value_type;
+ typedef time_duration query_type;
+ typedef MYSQL_TIME image_type;
+
+ static const unsigned short max_hours = 838;
+
+ static void
+ set_value (time_duration& v, const MYSQL_TIME& i, bool is_null)
+ {
+ if (is_null)
+ v = time_duration (::boost::date_time::not_a_date_time);
+ else
+ {
+ // Since MySQL 5.6.4, the microseconds part is no longer ignored.
+ //
+ unsigned long long fract_s (i.second_part);
+ fract_s = fract_s * time_duration::ticks_per_second () / 1000000ULL;
+
+ v = time_duration (
+ i.hour,
+ i.minute,
+ i.second,
+ static_cast<time_duration::fractional_seconds_type> (fract_s));
+
+ if (i.neg)
+ v = v.invert_sign ();
+ }
+ }
+
+ static void
+ set_image (MYSQL_TIME& i, bool& is_null, const time_duration& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else if (std::abs (v.hours ()) > max_hours)
+ throw odb::boost::date_time::value_out_of_range ();
+ else
+ {
+ is_null = false;
+ i.neg = v.is_negative ();
+
+ i.year = 0;
+ i.month = 0;
+ i.day = 0;
+
+ i.hour = std::abs (v.hours ());
+ i.minute = std::abs (v.minutes ());
+ i.second = std::abs (v.seconds ());
+
+ // Some compilers, e.g., VC8, don't have 64-bit abs() overload.
+ //
+ time_duration::fractional_seconds_type sms (v.fractional_seconds ());
+ unsigned long long ms (sms >= 0 ? sms : -sms);
+ ms = ms * 1000000ULL / time_duration::ticks_per_second ();
+ i.second_part = static_cast<unsigned long> (ms);
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::ptime>
+ {
+ static const database_type_id db_type_id = id_datetime;
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::time_duration>
+ {
+ static const database_type_id db_type_id = id_time;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_MYSQL_POSIX_TIME_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/oracle/gregorian-mapping.hxx b/libodb-boost/odb/boost/date-time/oracle/gregorian-mapping.hxx
new file mode 100644
index 0000000..65ad008
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/oracle/gregorian-mapping.hxx
@@ -0,0 +1,14 @@
+// file : odb/boost/date-time/oracle/gregorian-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_MAPPING_HXX
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+// By default map boost::gregorian::date to Oracle DATE. We use the
+// NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::gregorian::date) type("DATE") null
+
+#endif // ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/oracle/gregorian-traits.hxx b/libodb-boost/odb/boost/date-time/oracle/gregorian-traits.hxx
new file mode 100644
index 0000000..9e02e25
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/oracle/gregorian-traits.hxx
@@ -0,0 +1,83 @@
+// file : odb/boost/date-time/oracle/gregorian-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+#include <odb/core.hxx>
+
+#include <odb/oracle/traits.hxx>
+#include <odb/oracle/details/date.hxx>
+
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace oracle
+ {
+ template <>
+ struct default_value_traits< ::boost::gregorian::date, id_date>
+ {
+ typedef ::boost::gregorian::date date;
+ typedef date value_type;
+ typedef date query_type;
+ typedef char* image_type;
+
+ static void
+ set_value (date& v, const char* b, bool is_null)
+ {
+ if (is_null)
+ v = date (::boost::date_time::not_a_date_time);
+ else
+ {
+ short y;
+ unsigned char m, d, h, minute, s;
+
+ details::get_date (b, y, m, d, h, minute, s);
+
+ v = date (static_cast<date::year_type> (y),
+ static_cast<date::month_type> (m),
+ static_cast<date::day_type> (d));
+ }
+ }
+
+ static void
+ set_image (char* b, bool& is_null, const date& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ details::set_date (b,
+ static_cast<short> (v.year ()),
+ static_cast<unsigned char> (v.month ()),
+ static_cast<unsigned char> (v.day ()),
+ 0,
+ 0,
+ 0);
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::gregorian::date>
+ {
+ static const database_type_id db_type_id = id_date;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_ORACLE_GREGORIAN_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/oracle/posix-time-mapping.hxx b/libodb-boost/odb/boost/date-time/oracle/posix-time-mapping.hxx
new file mode 100644
index 0000000..26c642f
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/oracle/posix-time-mapping.hxx
@@ -0,0 +1,20 @@
+// file : odb/boost/date-time/oracle/posix-time-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_MAPPING_HXX
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+// By default map boost::posix_time::ptime to Oracle TIMESTAMP. We use the NULL
+// value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::ptime) type("TIMESTAMP") null
+
+// By default map boost::posix_time::time_duration to Oracle
+// INTERVAL DAY TO SECOND. We use the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::time_duration) \
+ type("INTERVAL DAY TO SECOND") null
+
+#endif // ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/oracle/posix-time-traits.hxx b/libodb-boost/odb/boost/date-time/oracle/posix-time-traits.hxx
new file mode 100644
index 0000000..1f830e0
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/oracle/posix-time-traits.hxx
@@ -0,0 +1,237 @@
+// file : odb/boost/date-time/oracle/posix-time-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+#include <odb/core.hxx>
+
+#include <odb/oracle/traits.hxx>
+#include <odb/oracle/oracle-fwd.hxx> // ub1, sb2, ub4
+#include <odb/oracle/oracle-types.hxx> // odb::oracle::{datetime interval_ds}
+#include <odb/oracle/details/date.hxx>
+
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace oracle
+ {
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_timestamp>
+ {
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ::boost::gregorian::date date;
+
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef datetime image_type;
+
+ static void
+ set_value (ptime& v, const datetime& i, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ {
+ sb2 y;
+ ub1 m, d, h, minute, s;
+ ub4 ns;
+
+ i.get (y, m, d, h, minute, s, ns);
+
+ unsigned long long fract_s (ns);
+ fract_s = fract_s * time_duration::ticks_per_second () /
+ 1000000000ULL;
+
+ v = ptime (
+ date (static_cast<date::year_type> (y),
+ static_cast<date::month_type> (m),
+ static_cast<date::day_type> (d)),
+ time_duration (
+ static_cast<time_duration::hour_type> (h),
+ static_cast<time_duration::min_type> (minute),
+ static_cast<time_duration::sec_type> (s),
+ static_cast<time_duration::fractional_seconds_type> (fract_s)));
+ }
+ }
+
+ static void
+ set_image (datetime& i, bool& is_null, const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ const date& d (v.date ());
+ const time_duration& t (v.time_of_day ());
+
+ unsigned long long ns (t.fractional_seconds ());
+ ns = ns * 1000000000ULL / time_duration::ticks_per_second ();
+
+ i.set (static_cast<sb2> (d.year ()),
+ static_cast<ub1> (d.month ()),
+ static_cast<ub1> (d.day ()),
+ static_cast<ub1> (t.hours ()),
+ static_cast<ub1> (t.minutes ()),
+ static_cast<ub1> (t.seconds ()),
+ static_cast<ub4> (ns));
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_date>
+ {
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ::boost::gregorian::date date;
+
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef char* image_type;
+
+ static void
+ set_value (ptime& v, const char* b, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ {
+ short y;
+ unsigned char m, d, h, minute, s;
+
+ details::get_date (b, y, m, d, h, minute, s);
+
+ v = ptime (
+ date (static_cast<date::year_type> (y),
+ static_cast<date::month_type> (m),
+ static_cast<date::day_type> (d)),
+ time_duration (
+ static_cast<time_duration::hour_type> (h),
+ static_cast<time_duration::min_type> (minute),
+ static_cast<time_duration::sec_type> (s),
+ 0));
+ }
+ }
+
+ static void
+ set_image (char* b, bool& is_null, const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ const date& d (v.date ());
+ const time_duration& t (v.time_of_day ());
+
+ details::set_date (b,
+ static_cast<short> (d.year ()),
+ static_cast<unsigned char> (d.month ()),
+ static_cast<unsigned char> (d.day ()),
+ static_cast<unsigned char> (t.hours ()),
+ static_cast<unsigned char> (t.minutes ()),
+ static_cast<unsigned char> (t.seconds ()));
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::posix_time::time_duration,
+ id_interval_ds>
+ {
+ typedef ::boost::posix_time::time_duration time_duration;
+
+ typedef time_duration value_type;
+ typedef time_duration query_type;
+ typedef interval_ds image_type;
+
+ static void
+ set_value (time_duration& v,
+ const interval_ds& i,
+ bool is_null)
+ {
+ if (is_null)
+ v = time_duration (::boost::date_time::not_a_date_time);
+ else
+ {
+ sb4 d, h, m, s, ns;
+ i.get (d, h, m, s, ns);
+
+ unsigned long long fract_s (ns);
+ fract_s = fract_s * time_duration::ticks_per_second () /
+ 1000000000ULL;
+
+ v = time_duration (
+ static_cast<time_duration::hour_type> (
+ static_cast<unsigned long long> (d) * 24 + h),
+ static_cast<time_duration::min_type> (m),
+ static_cast<time_duration::sec_type> (s),
+ static_cast<time_duration::fractional_seconds_type> (fract_s));
+ }
+ }
+
+ static void
+ set_image (interval_ds& i,
+ bool& is_null,
+ const time_duration& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ unsigned long long ns (v.fractional_seconds ());
+ ns = ns * 1000000000ULL / time_duration::ticks_per_second ();
+
+ i.set (0,
+ static_cast<sb4> (v.hours ()),
+ static_cast<sb4> (v.minutes ()),
+ static_cast<sb4> (v.seconds ()),
+ static_cast<sb4> (ns));
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::ptime>
+ {
+ static const database_type_id db_type_id = id_timestamp;
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::time_duration>
+ {
+ static const database_type_id db_type_id = id_interval_ds;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_ORACLE_POSIX_TIME_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/pgsql/gregorian-mapping.hxx b/libodb-boost/odb/boost/date-time/pgsql/gregorian-mapping.hxx
new file mode 100644
index 0000000..36a9334
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/pgsql/gregorian-mapping.hxx
@@ -0,0 +1,14 @@
+// file : odb/boost/date-time/pgsql/gregorian-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_MAPPING_HXX
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+// By default map boost::gregorian::date to PostgreSQL DATE. We use the
+// NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::gregorian::date) type("DATE") null
+
+#endif // ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/pgsql/gregorian-traits.hxx b/libodb-boost/odb/boost/date-time/pgsql/gregorian-traits.hxx
new file mode 100644
index 0000000..a0dcce2
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/pgsql/gregorian-traits.hxx
@@ -0,0 +1,69 @@
+// file : odb/boost/date-time/pgsql/gregorian-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+#include <odb/core.hxx>
+#include <odb/pgsql/traits.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace pgsql
+ {
+ template <>
+ struct default_value_traits< ::boost::gregorian::date, id_date>
+ {
+ typedef ::boost::gregorian::date date;
+
+ typedef details::endian_traits endian_traits;
+
+ typedef date value_type;
+ typedef date query_type;
+ typedef int image_type;
+
+ static void
+ set_value (date& v, int i, bool is_null)
+ {
+ if (is_null)
+ v = date (::boost::date_time::not_a_date_time);
+ else
+ v = date (2000, 1, 1) + ::boost::gregorian::date_duration (
+ endian_traits::ntoh (i));
+ }
+
+ static void
+ set_image (int& i, bool& is_null, const date& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+ i = endian_traits::hton (
+ static_cast<int> ((v - date (2000, 1, 1)).days ()));
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::gregorian::date>
+ {
+ static const database_type_id db_type_id = id_date;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_PGSQL_GREGORIAN_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/pgsql/posix-time-mapping.hxx b/libodb-boost/odb/boost/date-time/pgsql/posix-time-mapping.hxx
new file mode 100644
index 0000000..ace906d
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/pgsql/posix-time-mapping.hxx
@@ -0,0 +1,19 @@
+// file : odb/boost/date-time/pgsql/posix-time-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_MAPPING_HXX
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+// By default map boost::posix_time::ptime to PostgreSQL TIMESTAMP. We use
+// the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::ptime) type("TIMESTAMP") null
+
+// By default map boost::posix_time::time_duration to PostgreSQL TIME. We
+// use the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::time_duration) type("TIME") null
+
+#endif // ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/pgsql/posix-time-traits.hxx b/libodb-boost/odb/boost/date-time/pgsql/posix-time-traits.hxx
new file mode 100644
index 0000000..6713adc
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/pgsql/posix-time-traits.hxx
@@ -0,0 +1,169 @@
+// file : odb/boost/date-time/pgsql/posix-time-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+#include <odb/core.hxx>
+#include <odb/pgsql/traits.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace pgsql
+ {
+ // Implementation of the mapping between boost::posix_time::ptime and
+ // PostgreSQL TIMESTAMP. TIMESTAMP values are stored as micro-seconds
+ // since the PostgreSQL epoch 2000-01-01.
+ //
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_timestamp>
+ {
+ typedef ::boost::gregorian::date date;
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+
+ typedef details::endian_traits endian_traits;
+
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef long long image_type;
+
+ static const long long neg_inf = -0x7fffffffffffffffLL - 1;
+ static const long long pos_inf = 0x7fffffffffffffffLL;
+
+ static void
+ set_value (ptime& v, long long i, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ {
+ i = endian_traits::ntoh (i);
+
+ if (i == neg_inf)
+ v = ptime (::boost::date_time::neg_infin);
+ else if (i == pos_inf)
+ v = ptime (::boost::date_time::pos_infin);
+ else
+ {
+ const ptime pg_epoch (date (2000, 1, 1),
+ time_duration (0, 0, 0));
+
+ // We need to split the microsecond image into hours and
+ // microseconds to avoid overflow during the fractional seconds
+ // calculation.
+ //
+ time_duration::hour_type h (
+ static_cast<time_duration::hour_type> (i / 3600000000LL));
+
+ i -= static_cast<long long> (h) * 3600000000LL;
+
+ v = pg_epoch +
+ time_duration (
+ h,
+ 0,
+ 0,
+ static_cast<time_duration::fractional_seconds_type> (
+ i * time_duration::ticks_per_second () / 1000000LL));
+ }
+ }
+ }
+
+ static void
+ set_image (long long& i, bool& is_null, const ptime& v)
+ {
+ is_null = false;
+
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else if (v.is_neg_infinity ())
+ i = endian_traits::hton (neg_inf);
+ else if (v.is_pos_infinity ())
+ i = endian_traits::hton (pos_inf);
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ const ptime pg_epoch (date (2000, 1, 1), time_duration (0, 0, 0));
+ i = endian_traits::hton (
+ static_cast<long long> ((v - pg_epoch).total_microseconds ()));
+ }
+ }
+ };
+
+ // Implementation of the mapping between boost::posix_time::time_duration
+ // and PostgreSQL TIME. The TIME values are stored as micro-seconds since
+ // 00:00:00.
+ //
+ template <>
+ struct default_value_traits< ::boost::posix_time::time_duration, id_time>
+ {
+ typedef ::boost::posix_time::time_duration time_duration;
+
+ typedef details::endian_traits endian_traits;
+
+ typedef time_duration value_type;
+ typedef time_duration query_type;
+ typedef long long image_type;
+
+ static void
+ set_value (time_duration& v, long long i, bool is_null)
+ {
+ if (is_null)
+ v = time_duration (::boost::date_time::not_a_date_time);
+ else
+ v = time_duration (
+ 0,
+ 0,
+ 0,
+ static_cast<time_duration::fractional_seconds_type> (
+ endian_traits::ntoh (i) * time_duration::ticks_per_second () /
+ 1000000LL));
+ }
+
+ static void
+ set_image (long long& i, bool& is_null, const time_duration& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else if (v.hours () < 0 || v.hours () > 24)
+ throw odb::boost::date_time::value_out_of_range ();
+ else
+ {
+ is_null = false;
+ i = endian_traits::hton (
+ static_cast<long long> (v.total_microseconds ()));
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::ptime>
+ {
+ static const database_type_id db_type_id = id_timestamp;
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::time_duration>
+ {
+ static const database_type_id db_type_id = id_time;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_PGSQL_POSIX_TIME_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/posix-time-common.options b/libodb-boost/odb/boost/date-time/posix-time-common.options
new file mode 100644
index 0000000..9421eeb
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/posix-time-common.options
@@ -0,0 +1,4 @@
+# file : odb/boost/date-time/posix-time-common.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
diff --git a/libodb-boost/odb/boost/date-time/posix-time-mssql.options b/libodb-boost/odb/boost/date-time/posix-time-mssql.options
new file mode 100644
index 0000000..656c718
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/posix-time-mssql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/posix-time-mssql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/mssql/posix-time-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/mssql/posix-time-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/posix-time-mysql.options b/libodb-boost/odb/boost/date-time/posix-time-mysql.options
new file mode 100644
index 0000000..5d5677d
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/posix-time-mysql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/posix-time-mysql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/mysql/posix-time-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/mysql/posix-time-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/posix-time-oracle.options b/libodb-boost/odb/boost/date-time/posix-time-oracle.options
new file mode 100644
index 0000000..0812568
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/posix-time-oracle.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/posix-time-oracle.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/oracle/posix-time-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/oracle/posix-time-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/posix-time-pgsql.options b/libodb-boost/odb/boost/date-time/posix-time-pgsql.options
new file mode 100644
index 0000000..d2830ff
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/posix-time-pgsql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/posix-time-pgsql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/pgsql/posix-time-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/pgsql/posix-time-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/posix-time-sqlite.options b/libodb-boost/odb/boost/date-time/posix-time-sqlite.options
new file mode 100644
index 0000000..bbe52dd
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/posix-time-sqlite.options
@@ -0,0 +1,11 @@
+# file : odb/boost/date-time/posix-time-sqlite.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/date-time/sqlite/posix-time-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/date-time/sqlite/posix-time-traits.hxx>'
diff --git a/libodb-boost/odb/boost/date-time/sqlite/gregorian-mapping.hxx b/libodb-boost/odb/boost/date-time/sqlite/gregorian-mapping.hxx
new file mode 100644
index 0000000..9880927
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/sqlite/gregorian-mapping.hxx
@@ -0,0 +1,14 @@
+// file : odb/boost/date-time/sqlite/gregorian-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX
+
+#include <boost/date_time/gregorian/gregorian_types.hpp>
+
+// By default map boost::gregorian::date to TEXT. We use the
+// NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::gregorian::date) type("TEXT") null
+
+#endif // ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/sqlite/gregorian-traits.hxx b/libodb-boost/odb/boost/date-time/sqlite/gregorian-traits.hxx
new file mode 100644
index 0000000..b48b4dd
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/sqlite/gregorian-traits.hxx
@@ -0,0 +1,133 @@
+// file : odb/boost/date-time/sqlite/gregorian-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <string>
+#include <cstddef> // std::size_t
+#include <cstring> // std::memcpy
+#include <ctime> // std::time_t
+
+#include <boost/date_time/gregorian/gregorian_types.hpp> // date
+#include <boost/date_time/posix_time/posix_time_types.hpp> // time_duration
+#include <boost/date_time/gregorian/parsers.hpp> // from_simple_string
+#include <boost/date_time/gregorian/formatters.hpp> // to_iso_extended_string
+#include <boost/date_time/posix_time/conversion.hpp> // from_time_t
+
+#include <odb/core.hxx>
+#include <odb/details/buffer.hxx>
+#include <odb/sqlite/traits.hxx>
+
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace sqlite
+ {
+ template <>
+ struct default_value_traits< ::boost::gregorian::date, id_text>
+ {
+ typedef ::boost::gregorian::date date;
+ typedef date value_type;
+ typedef date query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (date& v,
+ const details::buffer& i,
+ std::size_t n,
+ bool is_null)
+ {
+ if (is_null)
+ v = date (::boost::date_time::not_a_date_time);
+ else
+ v = ::boost::gregorian::from_simple_string (
+ std::string (i.data (), n));
+ }
+
+ static void
+ set_image (details::buffer& i,
+ std::size_t& n,
+ bool& is_null,
+ const date& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ const std::string& s (
+ ::boost::gregorian::to_iso_extended_string (v));
+
+ n = s.size ();
+
+ if (n > i.capacity ())
+ i.capacity (n);
+
+ std::memcpy (i.data (), s.data (), n);
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::gregorian::date, id_integer>
+ {
+ typedef ::boost::gregorian::date date;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ::boost::posix_time::ptime ptime;
+ typedef date value_type;
+ typedef date query_type;
+ typedef long long image_type;
+
+ static void
+ set_value (date& v, long long i, bool is_null)
+ {
+ if (is_null)
+ v = date (::boost::date_time::not_a_date_time);
+ else
+ v = ::boost::posix_time::from_time_t (
+ static_cast<std::time_t> (i)).date ();
+ }
+
+ static void
+ set_image (long long& i, bool& is_null, const date& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ ptime epoch (date (1970, 1, 1), time_duration (0, 0, 0));
+ i = static_cast<long long> (
+ (ptime (v, time_duration (0, 0, 0)) - epoch).ticks () /
+ time_duration::ticks_per_second ());
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::gregorian::date>
+ {
+ static const database_type_id db_type_id = id_text;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_SQLITE_GREGORIAN_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/date-time/sqlite/posix-time-mapping.hxx b/libodb-boost/odb/boost/date-time/sqlite/posix-time-mapping.hxx
new file mode 100644
index 0000000..544a7aa
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/sqlite/posix-time-mapping.hxx
@@ -0,0 +1,19 @@
+// file : odb/boost/date-time/sqlite/posix-time-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX
+#define ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+// By default map boost::posix_time::ptime to TEXT. We use
+// the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::ptime) type("TEXT") null
+
+// By default map boost::posix_time::time_duration to TEXT. We
+// use the NULL value to represent not_a_date_time.
+//
+#pragma db value(boost::posix_time::time_duration) type("TEXT") null
+
+#endif // ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/date-time/sqlite/posix-time-traits.hxx b/libodb-boost/odb/boost/date-time/sqlite/posix-time-traits.hxx
new file mode 100644
index 0000000..482f203
--- /dev/null
+++ b/libodb-boost/odb/boost/date-time/sqlite/posix-time-traits.hxx
@@ -0,0 +1,238 @@
+// file : odb/boost/date-time/sqlite/posix-time-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_TRAITS_HXX
+#define ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <string>
+#include <cstddef> // std::size_t
+#include <cstring> // std::memcpy
+#include <ctime> // std::time_t
+
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+#include <boost/date_time/posix_time/time_parsers.hpp> // time_from_string
+#include <boost/date_time/posix_time/time_formatters.hpp> // to_simple_string
+#include <boost/date_time/posix_time/conversion.hpp> // from_time_t
+
+#include <odb/core.hxx>
+#include <odb/details/buffer.hxx>
+#include <odb/sqlite/traits.hxx>
+
+#include <odb/boost/date-time/exceptions.hxx>
+
+namespace odb
+{
+ namespace sqlite
+ {
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_text>
+ {
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (ptime& v,
+ const details::buffer& i,
+ std::size_t n,
+ bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ v = ::boost::posix_time::time_from_string (
+ std::string (i.data (), n));
+ }
+
+ static void
+ set_image (details::buffer& i,
+ std::size_t& n,
+ bool& is_null,
+ const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ std::string s (::boost::posix_time::to_iso_extended_string (v));
+
+ // Replace ',' in iso string with '.'. SQLite requires the
+ // latter for date/time functions.
+ //
+ std::size_t p = s.rfind (',');
+ if (p != std::string::npos)
+ s[p] = '.';
+
+ // Remove 'T' separator as Boost is unable to parse correctly.
+ //
+ p = s.find ('T');
+ if (p != std::string::npos)
+ s[p] = ' ';
+
+ n = s.size ();
+ if (n > i.capacity ())
+ i.capacity (n);
+
+ std::memcpy (i.data (), s.data (), n);
+ }
+ }
+ };
+
+ // Implementation of the mapping between boost::posix_time::ptime and
+ // SQLite INTEGER. The integer value represents UNIX time.
+ //
+ template <>
+ struct default_value_traits< ::boost::posix_time::ptime, id_integer>
+ {
+ typedef ::boost::gregorian::date date;
+ typedef ::boost::posix_time::ptime ptime;
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef ptime value_type;
+ typedef ptime query_type;
+ typedef long long image_type;
+
+ static void
+ set_value (ptime& v, long long i, bool is_null)
+ {
+ if (is_null)
+ v = ptime (::boost::date_time::not_a_date_time);
+ else
+ v = ::boost::posix_time::from_time_t (static_cast<std::time_t> (i));
+ }
+
+ static void
+ set_image (long long& i, bool& is_null, const ptime& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+
+ ptime epoch (date (1970, 1, 1), time_duration (0, 0, 0));
+ i = static_cast<long long> (
+ (v - epoch).ticks () / time_duration::ticks_per_second ());
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::posix_time::time_duration, id_text>
+ {
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef time_duration value_type;
+ typedef time_duration query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (time_duration& v,
+ const details::buffer& i,
+ std::size_t n,
+ bool is_null)
+ {
+ if (is_null)
+ v = time_duration (::boost::date_time::not_a_date_time);
+ else
+ {
+ v = ::boost::posix_time::duration_from_string (
+ std::string (i.data (), n));
+ }
+ }
+
+ static void
+ set_image (details::buffer& i,
+ std::size_t& n,
+ bool& is_null,
+ const time_duration& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else if (v.total_seconds () < 0)
+ throw odb::boost::date_time::value_out_of_range ();
+ else
+ {
+ is_null = false;
+
+ const std::string& s (::boost::posix_time::to_simple_string (v));
+
+ n = s.size ();
+ if (n > i.capacity ())
+ i.capacity (n);
+
+ std::memcpy (i.data (), s.data (), n);
+ }
+ }
+ };
+
+ template <>
+ struct default_value_traits< ::boost::posix_time::time_duration, id_integer>
+ {
+ typedef ::boost::posix_time::time_duration time_duration;
+ typedef time_duration value_type;
+ typedef time_duration query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (time_duration& v, long long i, bool is_null)
+ {
+ if (is_null)
+ v = time_duration (::boost::date_time::not_a_date_time);
+ else
+ v = time_duration (0, 0, static_cast<time_duration::sec_type> (i));
+ }
+
+ static void
+ set_image (long long& i, bool& is_null, const time_duration& v)
+ {
+ if (v.is_special ())
+ {
+ if (v.is_not_a_date_time ())
+ is_null = true;
+ else
+ throw odb::boost::date_time::special_value ();
+ }
+ else
+ {
+ is_null = false;
+ i = static_cast<long long> (v.total_seconds ());
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::ptime>
+ {
+ static const database_type_id db_type_id = id_text;
+ };
+
+ template <>
+ struct default_type_traits< ::boost::posix_time::time_duration>
+ {
+ static const database_type_id db_type_id = id_text;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DATE_TIME_SQLITE_POSIX_TIME_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/details/build2/config-stub.h b/libodb-boost/odb/boost/details/build2/config-stub.h
new file mode 100644
index 0000000..6f5f461
--- /dev/null
+++ b/libodb-boost/odb/boost/details/build2/config-stub.h
@@ -0,0 +1,5 @@
+/* file : odb/boost/details/build2/config-stub.h
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+#include <odb/boost/details/config.h>
diff --git a/libodb-boost/odb/boost/details/build2/config-vc-stub.h b/libodb-boost/odb/boost/details/build2/config-vc-stub.h
new file mode 100644
index 0000000..c6650f3
--- /dev/null
+++ b/libodb-boost/odb/boost/details/build2/config-vc-stub.h
@@ -0,0 +1,5 @@
+/* file : odb/boost/details/build2/config-vc-stub.h
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+#include <odb/boost/details/config-vc.h>
diff --git a/libodb-boost/odb/boost/details/build2/config-vc.h b/libodb-boost/odb/boost/details/build2/config-vc.h
new file mode 100644
index 0000000..5cdff2b
--- /dev/null
+++ b/libodb-boost/odb/boost/details/build2/config-vc.h
@@ -0,0 +1,15 @@
+/* file : odb/boost/details/build2/config-vc.h
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+/* Configuration file for Windows/VC++ for the build2 build. */
+
+#ifndef ODB_BOOST_DETAILS_CONFIG_VC_H
+#define ODB_BOOST_DETAILS_CONFIG_VC_H
+
+/* Define LIBODB_BOOST_BUILD2 for the installed case. */
+#ifndef LIBODB_BOOST_BUILD2
+# define LIBODB_BOOST_BUILD2
+#endif
+
+#endif /* ODB_BOOST_DETAILS_CONFIG_VC_H */
diff --git a/libodb-boost/odb/boost/details/build2/config.h b/libodb-boost/odb/boost/details/build2/config.h
new file mode 100644
index 0000000..ea24ba3
--- /dev/null
+++ b/libodb-boost/odb/boost/details/build2/config.h
@@ -0,0 +1,17 @@
+/* file : odb/boost/details/build2/config.h
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+/* Static configuration file for the build2 build. The installed case
+ (when LIBODB_BOOST_BUILD2 is not necessarily defined) is the only
+ reason we have it. */
+
+#ifndef ODB_BOOST_DETAILS_CONFIG_H
+#define ODB_BOOST_DETAILS_CONFIG_H
+
+/* Define LIBODB_BOOST_BUILD2 for the installed case. */
+#ifndef LIBODB_BOOST_BUILD2
+# define LIBODB_BOOST_BUILD2
+#endif
+
+#endif /* ODB_BOOST_DETAILS_CONFIG_H */
diff --git a/libodb-boost/odb/boost/details/config-vc.h b/libodb-boost/odb/boost/details/config-vc.h
new file mode 100644
index 0000000..687a1e1
--- /dev/null
+++ b/libodb-boost/odb/boost/details/config-vc.h
@@ -0,0 +1,5 @@
+/* file : odb/boost/details/config-vc.h
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+/* Dummy configuration file for Windows/VC++. */
diff --git a/libodb-boost/odb/boost/details/config.h.in b/libodb-boost/odb/boost/details/config.h.in
new file mode 100644
index 0000000..3cfc3aa
--- /dev/null
+++ b/libodb-boost/odb/boost/details/config.h.in
@@ -0,0 +1,12 @@
+/* file : odb/boost/details/config.h.in
+ * license : GNU GPL v2; see accompanying LICENSE file
+ */
+
+/* This file is automatically processed by configure. */
+
+#ifndef ODB_BOOST_DETAILS_CONFIG_H
+#define ODB_BOOST_DETAILS_CONFIG_H
+
+#undef LIBODB_BOOST_STATIC_LIB
+
+#endif /* ODB_BOOST_DETAILS_CONFIG_H */
diff --git a/libodb-boost/odb/boost/details/config.hxx b/libodb-boost/odb/boost/details/config.hxx
new file mode 100644
index 0000000..f0fe850
--- /dev/null
+++ b/libodb-boost/odb/boost/details/config.hxx
@@ -0,0 +1,21 @@
+// file : odb/boost/details/config.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DETAILS_CONFIG_HXX
+#define ODB_BOOST_DETAILS_CONFIG_HXX
+
+// no pre
+
+#ifdef ODB_COMPILER
+# define LIBODB_BOOST_STATIC_LIB
+#elif !defined(LIBODB_BOOST_BUILD2)
+# ifdef _MSC_VER
+# include <odb/boost/details/config-vc.h>
+# else
+# include <odb/boost/details/config.h>
+# endif
+#endif
+
+// no post
+
+#endif // ODB_BOOST_DETAILS_CONFIG_HXX
diff --git a/libodb-boost/odb/boost/details/export.hxx b/libodb-boost/odb/boost/details/export.hxx
new file mode 100644
index 0000000..cb3b219
--- /dev/null
+++ b/libodb-boost/odb/boost/details/export.hxx
@@ -0,0 +1,78 @@
+// file : odb/boost/details/export.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_DETAILS_EXPORT_HXX
+#define ODB_BOOST_DETAILS_EXPORT_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/boost/details/config.hxx>
+
+// Normally we don't export class templates (but do complete specializations),
+// inline functions, and classes with only inline member functions. Exporting
+// classes that inherit from non-exported/imported bases (e.g., std::string)
+// will end up badly. The only known workarounds are to not inherit or to not
+// export. Also, MinGW GCC doesn't like seeing non-exported function being
+// used before their inline definition. The workaround is to reorder code. In
+// the end it's all trial and error.
+
+#ifdef LIBODB_BOOST_BUILD2
+
+#if defined(LIBODB_BOOST_STATIC) // Using static.
+# define LIBODB_BOOST_EXPORT
+#elif defined(LIBODB_BOOST_STATIC_BUILD) // Building static.
+# define LIBODB_BOOST_EXPORT
+#elif defined(LIBODB_BOOST_SHARED) // Using shared.
+# ifdef _WIN32
+# define LIBODB_BOOST_EXPORT __declspec(dllimport)
+# else
+# define LIBODB_BOOST_EXPORT
+# endif
+#elif defined(LIBODB_BOOST_SHARED_BUILD) // Building shared.
+# ifdef _WIN32
+# define LIBODB_BOOST_EXPORT __declspec(dllexport)
+# else
+# define LIBODB_BOOST_EXPORT
+# endif
+#else
+// If none of the above macros are defined, then we assume we are being used
+// by some third-party build system that cannot/doesn't signal the library
+// type. Note that this fallback works for both static and shared but in case
+// of shared will be sub-optimal compared to having dllimport.
+//
+# define LIBODB_BOOST_EXPORT // Using static or shared.
+#endif
+
+#else // LIBODB_BOOST_BUILD2
+
+#ifdef LIBODB_BOOST_STATIC_LIB
+# define LIBODB_BOOST_EXPORT
+#else
+# ifdef _WIN32
+# ifdef _MSC_VER
+# ifdef LIBODB_BOOST_DYNAMIC_LIB
+# define LIBODB_BOOST_EXPORT __declspec(dllexport)
+# else
+# define LIBODB_BOOST_EXPORT __declspec(dllimport)
+# endif
+# else
+# ifdef LIBODB_BOOST_DYNAMIC_LIB
+# ifdef DLL_EXPORT
+# define LIBODB_BOOST_EXPORT __declspec(dllexport)
+# else
+# define LIBODB_BOOST_EXPORT
+# endif
+# else
+# define LIBODB_BOOST_EXPORT __declspec(dllimport)
+# endif
+# endif
+# else
+# define LIBODB_BOOST_EXPORT
+# endif
+#endif
+
+#endif // LIBODB_BOOST_BUILD2
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_DETAILS_EXPORT_HXX
diff --git a/libodb-boost/odb/boost/exception.hxx b/libodb-boost/odb/boost/exception.hxx
new file mode 100644
index 0000000..f616a30
--- /dev/null
+++ b/libodb-boost/odb/boost/exception.hxx
@@ -0,0 +1,28 @@
+// file : odb/boost/exception.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_EXCEPTION_HXX
+#define ODB_BOOST_EXCEPTION_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/exceptions.hxx>
+
+#include <odb/details/config.hxx> // ODB_NOTHROW_NOEXCEPT
+#include <odb/boost/details/export.hxx>
+
+namespace odb
+{
+ namespace boost
+ {
+ struct LIBODB_BOOST_EXPORT exception: odb::exception
+ {
+ virtual const char*
+ what () const ODB_NOTHROW_NOEXCEPT = 0;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_EXCEPTION_HXX
diff --git a/libodb-boost/odb/boost/lazy-ptr.hxx b/libodb-boost/odb/boost/lazy-ptr.hxx
new file mode 100644
index 0000000..35a8acf
--- /dev/null
+++ b/libodb-boost/odb/boost/lazy-ptr.hxx
@@ -0,0 +1,9 @@
+// file : odb/boost/lazy-ptr.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_LAZY_PTR_HXX
+#define ODB_BOOST_LAZY_PTR_HXX
+
+#include <odb/boost/smart-ptr/lazy-ptr.hxx>
+
+#endif // ODB_BOOST_LAZY_PTR_HXX
diff --git a/libodb-boost/odb/boost/multi-index.options b/libodb-boost/odb/boost/multi-index.options
new file mode 100644
index 0000000..731d197
--- /dev/null
+++ b/libodb-boost/odb/boost/multi-index.options
@@ -0,0 +1,7 @@
+# file : odb/boost/multi-index.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+--odb-epilogue '#include <odb/boost/multi-index/container-traits.hxx>'
+--hxx-prologue '#include <odb/boost/multi-index/container-traits.hxx>'
diff --git a/libodb-boost/odb/boost/multi-index/container-traits.hxx b/libodb-boost/odb/boost/multi-index/container-traits.hxx
new file mode 100644
index 0000000..b027886
--- /dev/null
+++ b/libodb-boost/odb/boost/multi-index/container-traits.hxx
@@ -0,0 +1,215 @@
+// file : odb/boost/multi-index/container-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_MULTI_INDEX_CONTAINER_TRAITS_HXX
+#define ODB_BOOST_MULTI_INDEX_CONTAINER_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// Multi-index container is available since 1.32.0.
+//
+#if BOOST_VERSION >= 103200
+
+#include <odb/pre.hxx>
+
+#include <utility> // std::move
+
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/begin_end.hpp>
+
+#include <boost/multi_index_container.hpp>
+#include <boost/multi_index/sequenced_index.hpp>
+#include <boost/multi_index/random_access_index.hpp>
+
+#include <odb/container-traits.hxx>
+#include <odb/details/config.hxx> // ODB_CXX11
+
+namespace odb
+{
+ // Multi-index container can be ordered or set. Whether it is ordered
+ // depends on whether it has any sequenced or random_access indexes.
+ // If it is ordered, then we need to use one of these indexes to store
+ // elements in a specific order. Otherwise, we can use the first index
+ // since the order of elements in the database is not important. Note
+ // that there is a terminology clash between ODB and Boost multi-index.
+ // What ODB calls ordered containers, multi-index calls sequenced and
+ // random_access. And what ODB calls set containers, multi-index calls
+ // ordered and hashed.
+ //
+
+ // Test whether index is ordered.
+ //
+ template <typename I>
+ struct multi_index_ordered
+ {
+ static const bool value = false;
+ };
+
+ template <typename T>
+ struct multi_index_ordered< ::boost::multi_index::sequenced<T> >
+ {
+ static const bool value = true;
+ };
+
+ template <typename T>
+ struct multi_index_ordered< ::boost::multi_index::random_access<T> >
+ {
+ static const bool value = true;
+ };
+
+ // Get the index of the first ordered sub-index or -1 if none exists.
+ //
+ template <typename B, typename I, typename E>
+ struct multi_index_ordered_index
+ {
+ static const int value = ::boost::mpl::distance<B, I>::value;
+ };
+
+ template <typename B, typename E>
+ struct multi_index_ordered_index<B, E, E>
+ {
+ static const int value = -1;
+ };
+
+ template <typename V,
+ typename ISP,
+ typename A,
+ int N =
+ multi_index_ordered_index<
+ typename ::boost::mpl::begin<ISP>::type,
+ typename ::boost::mpl::find_if<
+ ISP, multi_index_ordered< ::boost::mpl::_1 > >::type,
+ typename ::boost::mpl::end<ISP>::type>::value>
+ class multi_index_traits
+ {
+ public:
+ static const container_kind kind = ck_ordered;
+ static const bool smart = false;
+
+ typedef ::boost::multi_index_container<V, ISP, A> container_type;
+ typedef typename container_type::template nth_index<N>::type
+ ordered_container_type;
+
+ typedef V value_type;
+ typedef typename ordered_container_type::size_type index_type;
+
+ typedef ordered_functions<index_type, value_type> functions;
+
+ public:
+ static void
+ persist (const container_type& c, const functions& f)
+ {
+ const ordered_container_type& oc (c.template get<N> ());
+ index_type i (0);
+ for (typename ordered_container_type::const_iterator j (oc.begin ()),
+ e (oc.end ()); j != e; ++j)
+ f.insert (i++, *j);
+ }
+
+ static void
+ load (container_type& c, bool more, const functions& f)
+ {
+ ordered_container_type& oc (c.template get<N> ());
+ oc.clear ();
+
+ while (more)
+ {
+ index_type dummy;
+ value_type v;
+ more = f.select (dummy, v);
+#ifdef ODB_CXX11
+ oc.push_back (std::move (v));
+#else
+ oc.push_back (v);
+#endif
+ }
+ }
+
+ static void
+ update (const container_type& c, const functions& f)
+ {
+ f.delete_ ();
+
+ const ordered_container_type& oc (c.template get<N> ());
+ index_type i (0);
+ for (typename ordered_container_type::const_iterator j (oc.begin ()),
+ e (oc.end ()); j != e; ++j)
+ f.insert (i++, *j);
+ }
+
+ static void
+ erase (const functions& f)
+ {
+ f.delete_ ();
+ }
+ };
+
+ // Set specialization.
+ //
+ template <typename V, typename ISP, typename A>
+ class multi_index_traits<V, ISP, A, -1>
+ {
+ public:
+ static const container_kind kind = ck_set;
+ static const bool smart = false;
+
+ typedef ::boost::multi_index_container<V, ISP, A> container_type;
+ typedef V value_type;
+
+ typedef set_functions<value_type> functions;
+
+ public:
+ static void
+ persist (const container_type& c, const functions& f)
+ {
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (*i);
+ }
+
+ static void
+ load (container_type& c, bool more, const functions& f)
+ {
+ c.clear ();
+
+ while (more)
+ {
+ value_type v;
+ more = f.select (v);
+#ifdef ODB_CXX11
+ c.insert (std::move (v));
+#else
+ c.insert (v);
+#endif
+ }
+ }
+
+ static void
+ update (const container_type& c, const functions& f)
+ {
+ f.delete_ ();
+
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (*i);
+ }
+
+ static void
+ erase (const functions& f)
+ {
+ f.delete_ ();
+ }
+ };
+
+ template <typename V, typename ISP, typename A>
+ class access::container_traits< ::boost::multi_index_container<V, ISP, A> >
+ : public multi_index_traits<V, ISP, A>
+ {
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_MULTI_INDEX_CONTAINER_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/optional.options b/libodb-boost/odb/boost/optional.options
new file mode 100644
index 0000000..d57b22b
--- /dev/null
+++ b/libodb-boost/odb/boost/optional.options
@@ -0,0 +1,7 @@
+# file : odb/boost/optional.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+--odb-epilogue '#include <odb/boost/optional/wrapper-traits.hxx>'
+--hxx-prologue '#include <odb/boost/optional/wrapper-traits.hxx>'
diff --git a/libodb-boost/odb/boost/optional/wrapper-traits.hxx b/libodb-boost/odb/boost/optional/wrapper-traits.hxx
new file mode 100644
index 0000000..80d4319
--- /dev/null
+++ b/libodb-boost/odb/boost/optional/wrapper-traits.hxx
@@ -0,0 +1,63 @@
+// file : odb/boost/optional/wrapper-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_OPTIONAL_WRAPPER_TRAITS_HXX
+#define ODB_BOOST_OPTIONAL_WRAPPER_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/none.hpp>
+#include <boost/optional.hpp>
+
+#include <odb/wrapper-traits.hxx>
+
+namespace odb
+{
+ template <typename T>
+ class wrapper_traits< ::boost::optional<T> >
+ {
+ public:
+ typedef T wrapped_type;
+ typedef ::boost::optional<T> wrapper_type;
+
+ // T can be const.
+ //
+ typedef
+ typename odb::details::meta::remove_const<T>::result
+ unrestricted_wrapped_type;
+
+ static const bool null_handler = true;
+ static const bool null_default = true;
+
+ static bool
+ get_null (const wrapper_type& o)
+ {
+ return !o;
+ }
+
+ static void
+ set_null (wrapper_type& o)
+ {
+ o = ::boost::none;
+ }
+
+ static const wrapped_type&
+ get_ref (const wrapper_type& o)
+ {
+ return *o;
+ }
+
+ static unrestricted_wrapped_type&
+ set_ref (wrapper_type& o)
+ {
+ if (!o)
+ o = unrestricted_wrapped_type ();
+
+ return const_cast<unrestricted_wrapped_type&> (*o);
+ }
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_OPTIONAL_WRAPPER_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/smart-ptr.options b/libodb-boost/odb/boost/smart-ptr.options
new file mode 100644
index 0000000..2b0f2a4
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr.options
@@ -0,0 +1,19 @@
+# file : odb/boost/smart-ptr.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Make boost::shared_ptr the default object pointer.
+#
+--hxx-prologue '#include <boost/shared_ptr.hpp>'
+--default-pointer ::boost::shared_ptr
+
+# Include pointer traits.
+#
+--odb-epilogue '#include <odb/boost/smart-ptr/pointer-traits.hxx>'
+--hxx-prologue '#include <odb/boost/smart-ptr/pointer-traits.hxx>'
+
+# Include wrapper traits.
+#
+--odb-epilogue '#include <odb/boost/smart-ptr/wrapper-traits.hxx>'
+--hxx-prologue '#include <odb/boost/smart-ptr/wrapper-traits.hxx>'
diff --git a/libodb-boost/odb/boost/smart-ptr/lazy-pointer-traits.hxx b/libodb-boost/odb/boost/smart-ptr/lazy-pointer-traits.hxx
new file mode 100644
index 0000000..92b5441
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr/lazy-pointer-traits.hxx
@@ -0,0 +1,61 @@
+// file : odb/boost/smart-ptr/lazy-pointer-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_SMART_PTR_LAZY_POINTER_TRAITS_HXX
+#define ODB_BOOST_SMART_PTR_LAZY_POINTER_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/pointer-traits.hxx>
+#include <odb/boost/smart-ptr/lazy-ptr.hxx>
+
+namespace odb
+{
+ template <typename T>
+ class pointer_traits<boost::lazy_shared_ptr<T> >
+ {
+ public:
+ static const pointer_kind kind = pk_shared;
+ static const bool lazy = true;
+
+ typedef T element_type;
+ typedef boost::lazy_shared_ptr<element_type> pointer_type;
+ typedef ::boost::shared_ptr<element_type> eager_pointer_type;
+
+ static bool
+ null_ptr (const pointer_type& p)
+ {
+ return !p;
+ }
+
+ template <class O /* = T */>
+ static typename object_traits<O>::id_type
+ object_id (const pointer_type& p)
+ {
+ return p.template object_id<O> ();
+ }
+ };
+
+ template <typename T>
+ class pointer_traits<boost::lazy_weak_ptr<T> >
+ {
+ public:
+ static const pointer_kind kind = pk_weak;
+ static const bool lazy = true;
+
+ typedef T element_type;
+ typedef boost::lazy_weak_ptr<element_type> pointer_type;
+ typedef boost::lazy_shared_ptr<element_type> strong_pointer_type;
+ typedef ::boost::weak_ptr<element_type> eager_pointer_type;
+
+ static strong_pointer_type
+ lock (const pointer_type& p)
+ {
+ return p.lock ();
+ }
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_SMART_PTR_LAZY_POINTER_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/smart-ptr/lazy-ptr.hxx b/libodb-boost/odb/boost/smart-ptr/lazy-ptr.hxx
new file mode 100644
index 0000000..ec25eb1
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr/lazy-ptr.hxx
@@ -0,0 +1,269 @@
+// file : odb/boost/smart-ptr/lazy-ptr.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_SMART_PTR_LAZY_PTR_HXX
+#define ODB_BOOST_SMART_PTR_LAZY_PTR_HXX
+
+#include <odb/pre.hxx>
+
+#include <memory> // std::auto_ptr
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+#include <odb/forward.hxx> // odb::database
+#include <odb/traits.hxx>
+#include <odb/lazy-ptr-impl.hxx>
+#include <odb/details/config.hxx> // ODB_CXX11
+
+namespace odb
+{
+ namespace boost
+ {
+ template <class T>
+ class lazy_weak_ptr;
+
+ //
+ //
+ template <class T>
+ class lazy_shared_ptr
+ {
+ // The standard shared_ptr interface.
+ //
+ public:
+ typedef T element_type;
+
+ lazy_shared_ptr ();
+ template <class Y> explicit lazy_shared_ptr (Y*);
+ template <class Y, class D> lazy_shared_ptr (Y*, D);
+ template <class Y, class D, class A> lazy_shared_ptr (Y*, D, A);
+
+ lazy_shared_ptr (const lazy_shared_ptr&);
+ template <class Y> lazy_shared_ptr (const lazy_shared_ptr<Y>&);
+ template <class Y> explicit lazy_shared_ptr (const lazy_weak_ptr<Y>&);
+ template <class Y> explicit lazy_shared_ptr (std::auto_ptr<Y>&);
+
+ ~lazy_shared_ptr ();
+
+ lazy_shared_ptr& operator= (const lazy_shared_ptr&);
+ template <class Y> lazy_shared_ptr& operator= (const lazy_shared_ptr<Y>&);
+ template <class Y> lazy_shared_ptr& operator= (std::auto_ptr<Y>&);
+
+ void swap (lazy_shared_ptr&);
+ void reset ();
+ template <class Y> void reset (Y*);
+ template <class Y, class D> void reset (Y*, D);
+ template <class Y, class D, class A> void reset (Y*, D, A);
+
+ T& operator* () const;
+ T* operator-> () const;
+ T* get () const;
+
+ bool unique () const;
+ long use_count () const;
+
+ typedef ::boost::shared_ptr<T> lazy_shared_ptr::*unspecified_bool_type;
+ operator unspecified_bool_type () const
+ {
+ return (p_ || i_) ? &lazy_shared_ptr::p_ : 0;
+ }
+
+ // Initialization/assignment from shared_ptr and weak_ptr.
+ //
+ public:
+ template <class Y> lazy_shared_ptr (const ::boost::shared_ptr<Y>&);
+ template <class Y> explicit lazy_shared_ptr (const ::boost::weak_ptr<Y>&);
+
+ template <class Y> lazy_shared_ptr& operator= (const ::boost::shared_ptr<Y>&);
+
+ // Lazy loading interface.
+ //
+ public:
+ typedef odb::database database_type;
+
+ // NULL loaded()
+ //
+ // true true NULL pointer to transient object
+ // false true valid pointer to persistent object
+ // true false unloaded pointer to persistent object
+ // false false valid pointer to transient object
+ //
+ bool loaded () const;
+
+ ::boost::shared_ptr<T> load () const;
+
+ // Unload the pointer. For transient objects this function is
+ // equivalent to reset().
+ //
+ void unload () const;
+
+ // Get the underlying eager pointer. If this is an unloaded pointer
+ // to a persistent object, then the returned pointer will be NULL.
+ //
+ ::boost::shared_ptr<T> get_eager () const;
+
+ template <class DB, class ID> lazy_shared_ptr (DB&, const ID&);
+ template <class DB, class Y> lazy_shared_ptr (DB&, Y*);
+ template <class DB, class Y, class D> lazy_shared_ptr (DB&, Y*, D);
+ template <class DB, class Y, class D, class A> lazy_shared_ptr (DB&, Y*, D, A);
+ template <class DB, class Y> lazy_shared_ptr (DB&, std::auto_ptr<Y>&);
+ template <class DB, class Y> lazy_shared_ptr (DB&, const ::boost::shared_ptr<Y>&);
+ template <class DB, class Y> lazy_shared_ptr (DB&, const ::boost::weak_ptr<Y>&);
+
+ template <class DB, class ID> void reset (DB&, const ID&);
+ template <class DB, class Y> void reset (DB&, Y*);
+ template <class DB, class Y, class D> void reset (DB&, Y*, D);
+ template <class DB, class Y, class D, class A> void reset (DB&, Y*, D, A);
+ template <class DB, class Y> void reset (DB&, std::auto_ptr<Y>&);
+ template <class DB, class Y> void reset (DB&, const ::boost::shared_ptr<Y>&);
+
+#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT
+ template <class O = T>
+#else
+ template <class O /* = T */>
+#endif
+ typename object_traits<O>::id_type object_id () const;
+
+ database_type& database () const;
+
+ // Helpers.
+ //
+ public:
+ template <class Y> bool equal (const lazy_shared_ptr<Y>&) const;
+
+ private:
+ template <class Y> friend class lazy_shared_ptr;
+ template <class Y> friend class lazy_weak_ptr;
+
+ // For lazy_weak_ptr::lock().
+ //
+ lazy_shared_ptr (const ::boost::shared_ptr<T>& p,
+ const lazy_ptr_impl<T>& i)
+ : p_ (p), i_ (i) {}
+
+ private:
+ mutable ::boost::shared_ptr<T> p_;
+ mutable lazy_ptr_impl<T> i_;
+ };
+
+ // operator< and operator<< are not provided.
+ //
+ template<class T, class Y>
+ bool operator== (const lazy_shared_ptr<T>&, const lazy_shared_ptr<Y>&);
+
+ template<class T, class Y>
+ bool operator!= (const lazy_shared_ptr<T>&, const lazy_shared_ptr<Y>&);
+
+ template<class T> void swap (lazy_shared_ptr<T>&, lazy_shared_ptr<T>&);
+
+ template<class D, class T>
+ D* get_deleter (const lazy_shared_ptr<T>&);
+
+ //
+ //
+ template <class T>
+ class lazy_weak_ptr
+ {
+ // The standard weak_ptr interface.
+ //
+ public:
+ typedef T element_type;
+
+ lazy_weak_ptr ();
+ template <class Y> lazy_weak_ptr (const lazy_shared_ptr<Y>&);
+ lazy_weak_ptr (const lazy_weak_ptr&);
+ template <class Y> lazy_weak_ptr (const lazy_weak_ptr<Y>&);
+
+ ~lazy_weak_ptr ();
+
+ lazy_weak_ptr& operator= (const lazy_weak_ptr&);
+ template <class Y> lazy_weak_ptr& operator= (const lazy_weak_ptr<Y>&);
+ template <class Y> lazy_weak_ptr& operator= (const lazy_shared_ptr<Y>&);
+
+ void swap (lazy_weak_ptr<T>&);
+ void reset ();
+
+ long use_count () const;
+ bool expired () const;
+
+ lazy_shared_ptr<T> lock () const;
+
+ // Initialization/assignment from shared_ptr and weak_ptr.
+ //
+ public:
+ template <class Y> lazy_weak_ptr (const ::boost::weak_ptr<Y>&);
+ template <class Y> lazy_weak_ptr (const ::boost::shared_ptr<Y>&);
+
+ template <class Y> lazy_weak_ptr& operator= (const ::boost::weak_ptr<Y>&);
+ template <class Y> lazy_weak_ptr& operator= (const ::boost::shared_ptr<Y>&);
+
+ // Lazy loading interface.
+ //
+ public:
+ typedef odb::database database_type;
+
+ // expired() loaded()
+ //
+ // true true expired pointer to transient object
+ // false true valid pointer to persistent object
+ // true false expired pointer to persistent object
+ // false false valid pointer to transient object
+ //
+ bool loaded () const;
+
+ // Performs both lock and load.
+ //
+ ::boost::shared_ptr<T> load () const;
+
+ // Unload the pointer. For transient objects this function is
+ // equivalent to reset().
+ //
+ void unload () const;
+
+ // Get the underlying eager pointer. If this is an unloaded pointer
+ // to a persistent object, then the returned pointer will be NULL.
+ //
+ ::boost::weak_ptr<T> get_eager () const;
+
+ template <class DB, class ID> lazy_weak_ptr (DB&, const ID&);
+ template <class DB, class Y> lazy_weak_ptr (DB&, const ::boost::shared_ptr<Y>&);
+ template <class DB, class Y> lazy_weak_ptr (DB&, const ::boost::weak_ptr<Y>&);
+
+ template <class DB, class ID> void reset (DB&, const ID&);
+ template <class DB, class Y> void reset (DB&, const ::boost::shared_ptr<Y>&);
+ template <class DB, class Y> void reset (DB&, const ::boost::weak_ptr<Y>&);
+
+ // The object_id() function can only be called when the object is
+ // persistent, or: expired() XOR loaded() (can use != for XOR).
+ //
+#ifdef ODB_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGUMENT
+ template <class O = T>
+#else
+ template <class O /* = T */>
+#endif
+ typename object_traits<O>::id_type object_id () const;
+
+ database_type& database () const;
+
+ private:
+ template <class Y> friend class lazy_shared_ptr;
+ template <class Y> friend class lazy_weak_ptr;
+
+ mutable ::boost::weak_ptr<T> p_;
+ mutable lazy_ptr_impl<T> i_;
+ };
+
+ // operator< is not provided.
+ //
+ template<class T> void swap (lazy_weak_ptr<T>&, lazy_weak_ptr<T>&);
+ }
+}
+
+#include <odb/boost/smart-ptr/lazy-ptr.ixx>
+#include <odb/boost/smart-ptr/lazy-ptr.txx>
+
+#include <odb/boost/smart-ptr/lazy-pointer-traits.hxx>
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_SMART_PTR_LAZY_PTR_HXX
diff --git a/libodb-boost/odb/boost/smart-ptr/lazy-ptr.ixx b/libodb-boost/odb/boost/smart-ptr/lazy-ptr.ixx
new file mode 100644
index 0000000..4baad87
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr/lazy-ptr.ixx
@@ -0,0 +1,675 @@
+// file : odb/boost/smart-ptr/lazy-ptr.ixx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+namespace odb
+{
+ namespace boost
+ {
+ //
+ // lazy_shared_ptr
+ //
+
+ template <class T>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr () {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (Y* p): p_ (p) {}
+
+ template <class T>
+ template <class Y, class D>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (Y* p, D d): p_ (p, d) {}
+
+ template <class T>
+ template <class Y, class D, class A>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (Y* p, D d, A a): p_ (p, d, a) {}
+
+ template <class T>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (const lazy_shared_ptr& r): p_ (r.p_), i_ (r.i_) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (const lazy_shared_ptr<Y>& r): p_ (r.p_), i_ (r.i_) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (const lazy_weak_ptr<Y>& r): i_ (r.i_)
+ {
+ // If the pointer has expired but can be re-loaded, then don't throw.
+ //
+ p_ = r.lock ().get_eager ();
+
+ if (!p_ && !i_)
+ throw ::boost::bad_weak_ptr ();
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (std::auto_ptr<Y>& r): p_ (r) {}
+
+ template <class T>
+ inline lazy_shared_ptr<T>::
+ ~lazy_shared_ptr () {}
+
+ template <class T>
+ inline lazy_shared_ptr<T>& lazy_shared_ptr<T>::
+ operator= (const lazy_shared_ptr& r)
+ {
+ p_ = r.p_;
+ i_ = r.i_;
+ return *this;
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>& lazy_shared_ptr<T>::
+ operator= (const lazy_shared_ptr<Y>& r)
+ {
+ p_ = r.p_;
+ i_ = r.i_;
+ return *this;
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>& lazy_shared_ptr<T>::
+ operator= (std::auto_ptr<Y>& r)
+ {
+ p_ = r;
+ i_.reset ();
+ return *this;
+ }
+
+ template <class T>
+ inline void lazy_shared_ptr<T>::
+ swap (lazy_shared_ptr& b)
+ {
+ p_.swap (b.p_);
+ i_.swap (b.i_);
+ }
+
+ template <class T>
+ inline void lazy_shared_ptr<T>::
+ reset ()
+ {
+ p_.reset ();
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class Y>
+ inline void lazy_shared_ptr<T>::
+ reset (Y* p)
+ {
+ p_.reset (p);
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class Y, class D>
+ inline void lazy_shared_ptr<T>::
+ reset (Y* p, D d)
+ {
+ p_.reset (p, d);
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class Y, class D, class A>
+ inline void lazy_shared_ptr<T>::
+ reset (Y* p, D d, A a)
+ {
+ p_.reset (p, d, a);
+ i_.reset ();
+ }
+
+ template <class T>
+ inline T& lazy_shared_ptr<T>::
+ operator* () const
+ {
+ return *p_;
+ }
+
+ template <class T>
+ inline T* lazy_shared_ptr<T>::
+ operator-> () const
+ {
+ return p_.operator-> ();
+ }
+
+ template <class T>
+ inline T* lazy_shared_ptr<T>::
+ get () const
+ {
+ return p_.get ();
+ }
+
+ template <class T>
+ inline bool lazy_shared_ptr<T>::
+ unique () const
+ {
+ return p_.unique ();
+ }
+
+ template <class T>
+ inline long lazy_shared_ptr<T>::
+ use_count () const
+ {
+ return p_.use_count ();
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (const ::boost::shared_ptr<Y>& r): p_ (r) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (const ::boost::weak_ptr<Y>& r): p_ (r) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_shared_ptr<T>& lazy_shared_ptr<T>::
+ operator= (const ::boost::shared_ptr<Y>& r)
+ {
+ p_ = r;
+ i_.reset ();
+ return *this;
+ }
+
+ template <class T>
+ inline bool lazy_shared_ptr<T>::
+ loaded () const
+ {
+ bool i (i_);
+ return !p_ != i; // !p_ XOR i_
+ }
+
+ template <class T>
+ inline ::boost::shared_ptr<T> lazy_shared_ptr<T>::
+ load () const
+ {
+ if (!p_ && i_)
+ p_ = i_.template load<T> (true); // Reset id.
+
+ return p_;
+ }
+
+ template <class T>
+ inline void lazy_shared_ptr<T>::
+ unload () const
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ if (p_)
+ {
+ if (i_.database () != 0)
+ i_.reset_id (object_traits<object_type>::id (*p_));
+
+ p_.reset ();
+ }
+ }
+
+ template <class T>
+ inline ::boost::shared_ptr<T> lazy_shared_ptr<T>::
+ get_eager () const
+ {
+ return p_;
+ }
+
+ template <class T>
+ template <class DB, class ID>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, const ID& id): i_ (db, id) {}
+
+ template <class T>
+ template <class DB, class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, Y* p)
+ : p_ (p)
+ {
+ if (p_)
+ i_.reset_db (db);
+ }
+
+ template <class T>
+ template <class DB, class Y, class D>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, Y* p, D d)
+ : p_ (p, d)
+ {
+ if (p_)
+ i_.reset_db (db);
+ }
+
+ template <class T>
+ template <class DB, class Y, class D, class A>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, Y* p, D d, A a)
+ : p_ (p, d, a)
+ {
+ if (p_)
+ i_.reset_db (db);
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, std::auto_ptr<Y>& r)
+ : p_ (r)
+ {
+ if (p_)
+ i_.reset_db (db);
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, const ::boost::shared_ptr<Y>& r)
+ : p_ (r)
+ {
+ if (p_)
+ i_.reset_db (db);
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline lazy_shared_ptr<T>::
+ lazy_shared_ptr (DB& db, const ::boost::weak_ptr<Y>& r)
+ : p_ (r)
+ {
+ if (p_)
+ i_.reset_db (db);
+ }
+
+ template <class T>
+ template <class DB, class ID>
+ inline void lazy_shared_ptr<T>::
+ reset (DB& db, const ID& id)
+ {
+ p_.reset ();
+ i_.reset (db, id);
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline void lazy_shared_ptr<T>::
+ reset (DB& db, Y* p)
+ {
+ p_.reset (p);
+
+ if (p_)
+ i_.reset_db (db);
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class DB, class Y, class D>
+ inline void lazy_shared_ptr<T>::
+ reset (DB& db, Y* p, D d)
+ {
+ p_.reset (p, d);
+
+ if (p_)
+ i_.reset_db (db);
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class DB, class Y, class D, class A>
+ inline void lazy_shared_ptr<T>::
+ reset (DB& db, Y* p, D d, A a)
+ {
+ p_.reset (p, d, a);
+
+ if (p_)
+ i_.reset_db (db);
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline void lazy_shared_ptr<T>::
+ reset (DB& db, std::auto_ptr<Y>& r)
+ {
+ p_ = r;
+
+ if (p_)
+ i_.reset_db (db);
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline void lazy_shared_ptr<T>::
+ reset (DB& db, const ::boost::shared_ptr<Y>& r)
+ {
+ p_ = r;
+
+ if (p_)
+ i_.reset_db (db);
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class O>
+ inline typename object_traits<O>::id_type lazy_shared_ptr<T>::
+ object_id () const
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ return p_
+ ? object_traits<object_type>::id (*p_)
+ : i_.template object_id<O> ();
+ }
+
+ template <class T>
+ inline typename lazy_shared_ptr<T>::database_type& lazy_shared_ptr<T>::
+ database () const
+ {
+ return *i_.database ();
+ }
+
+ template<class T, class Y>
+ inline bool
+ operator== (const lazy_shared_ptr<T>& a, const lazy_shared_ptr<Y>& b)
+ {
+ return a.equal (b);
+ }
+
+ template<class T, class Y>
+ inline bool
+ operator!= (const lazy_shared_ptr<T>& a, const lazy_shared_ptr<Y>& b)
+ {
+ return !a.equal (b);
+ }
+
+ template<class T>
+ inline void
+ swap (lazy_shared_ptr<T>& a, lazy_shared_ptr<T>& b)
+ {
+ a.swap (b);
+ }
+
+ template<class D, class T>
+ inline D*
+ get_deleter (const lazy_shared_ptr<T>& p)
+ {
+ return ::boost::get_deleter<D> (p.p_);
+ }
+
+
+ //
+ // lazy_weak_ptr
+ //
+
+ template <class T>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr () {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (const lazy_shared_ptr<Y>& r): p_ (r.p_), i_ (r.i_) {}
+
+ template <class T>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (const lazy_weak_ptr& r): p_ (r.p_), i_ (r.i_) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (const lazy_weak_ptr<Y>& r): p_ (r.p_), i_ (r.i_) {}
+
+ template <class T>
+ inline lazy_weak_ptr<T>::
+ ~lazy_weak_ptr () {}
+
+ template <class T>
+ inline lazy_weak_ptr<T>& lazy_weak_ptr<T>::
+ operator= (const lazy_weak_ptr& r)
+ {
+ p_ = r.p_;
+ i_ = r.i_;
+ return *this;
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>& lazy_weak_ptr<T>::
+ operator= (const lazy_weak_ptr<Y>& r)
+ {
+ p_ = r.p_;
+ i_ = r.i_;
+ return *this;
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>& lazy_weak_ptr<T>::
+ operator= (const lazy_shared_ptr<Y>& r)
+ {
+ p_ = r.p_;
+ i_ = r.i_;
+ return *this;
+ }
+
+ template <class T>
+ inline void lazy_weak_ptr<T>::
+ swap (lazy_weak_ptr<T>& r)
+ {
+ p_.swap (r.p_);
+ i_.swap (r.i_);
+ }
+
+ template <class T>
+ inline void lazy_weak_ptr<T>::
+ reset ()
+ {
+ p_.reset ();
+ i_.reset ();
+ }
+
+ template <class T>
+ inline long lazy_weak_ptr<T>::
+ use_count () const
+ {
+ return p_.use_count ();
+ }
+
+ template <class T>
+ inline bool lazy_weak_ptr<T>::
+ expired () const
+ {
+ return p_.expired ();
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (const ::boost::weak_ptr<Y>& r): p_ (r) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (const ::boost::shared_ptr<Y>& r): p_ (r) {}
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>& lazy_weak_ptr<T>::
+ operator= (const ::boost::weak_ptr<Y>& r)
+ {
+ p_ = r;
+ i_.reset ();
+ return *this;
+ }
+
+ template <class T>
+ template <class Y>
+ inline lazy_weak_ptr<T>& lazy_weak_ptr<T>::
+ operator= (const ::boost::shared_ptr<Y>& r)
+ {
+ p_ = r;
+ i_.reset ();
+ return *this;
+ }
+
+ template <class T>
+ inline bool lazy_weak_ptr<T>::
+ loaded () const
+ {
+ bool i (i_);
+ return expired () != i; // expired () XOR i_
+ }
+
+ template <class T>
+ inline lazy_shared_ptr<T> lazy_weak_ptr<T>::
+ lock () const
+ {
+ return lazy_shared_ptr<T> (p_.lock (), i_);
+ }
+
+ template <class T>
+ inline ::boost::shared_ptr<T> lazy_weak_ptr<T>::
+ load () const
+ {
+ ::boost::shared_ptr<T> r (p_.lock ());
+
+ if (!r && i_)
+ {
+ r = i_.template load<T> (false); // Keep id.
+ p_ = r;
+ }
+
+ return r;
+ }
+
+ template <class T>
+ inline void lazy_weak_ptr<T>::
+ unload () const
+ {
+ // With weak pointer we always keep i_ up to date.
+ //
+ p_.reset ();
+ }
+
+ template <class T>
+ inline ::boost::weak_ptr<T> lazy_weak_ptr<T>::
+ get_eager () const
+ {
+ return p_;
+ }
+
+ template <class T>
+ template <class DB, class ID>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (DB& db, const ID& id): i_ (db, id) {}
+
+ template <class T>
+ template <class DB, class Y>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (DB& db, const ::boost::shared_ptr<Y>& r)
+ : p_ (r)
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ if (r)
+ i_.reset (db, object_traits<object_type>::id (*r));
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline lazy_weak_ptr<T>::
+ lazy_weak_ptr (DB& db, const ::boost::weak_ptr<Y>& r)
+ : p_ (r)
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ ::boost::shared_ptr<T> sp (p_.lock ());
+
+ if (sp)
+ i_.reset (db, object_traits<object_type>::id (*sp));
+ }
+
+ template <class T>
+ template <class DB, class ID>
+ inline void lazy_weak_ptr<T>::
+ reset (DB& db, const ID& id)
+ {
+ p_.reset ();
+ i_.reset (db, id);
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline void lazy_weak_ptr<T>::
+ reset (DB& db, const ::boost::shared_ptr<Y>& r)
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ p_ = r;
+
+ if (r)
+ i_.reset (db, object_traits<object_type>::id (*r));
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class DB, class Y>
+ inline void lazy_weak_ptr<T>::
+ reset (DB& db, const ::boost::weak_ptr<Y>& r)
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ p_ = r;
+ ::boost::shared_ptr<T> sp (p_.lock ());
+
+ if (sp)
+ i_.reset (db, object_traits<object_type>::id (*sp));
+ else
+ i_.reset ();
+ }
+
+ template <class T>
+ template <class O>
+ inline typename object_traits<O>::id_type lazy_weak_ptr<T>::
+ object_id () const
+ {
+ typedef typename object_traits<T>::object_type object_type;
+
+ ::boost::shared_ptr<T> sp (p_.lock ());
+ return sp
+ ? object_traits<object_type>::id (*sp)
+ : i_.template object_id<O> ();
+ }
+
+ template <class T>
+ inline typename lazy_weak_ptr<T>::database_type& lazy_weak_ptr<T>::
+ database () const
+ {
+ return *i_.database ();
+ }
+
+ template<class T>
+ inline void
+ swap (lazy_weak_ptr<T>& a, lazy_weak_ptr<T>& b)
+ {
+ a.swap (b);
+ }
+ }
+}
diff --git a/libodb-boost/odb/boost/smart-ptr/lazy-ptr.txx b/libodb-boost/odb/boost/smart-ptr/lazy-ptr.txx
new file mode 100644
index 0000000..c0cebd9
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr/lazy-ptr.txx
@@ -0,0 +1,43 @@
+// file : odb/boost/smart-ptr/lazy-ptr.txx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+namespace odb
+{
+ namespace boost
+ {
+ //
+ // lazy_shared_ptr
+ //
+
+ template <class T>
+ template <class Y>
+ bool lazy_shared_ptr<T>::
+ equal (const lazy_shared_ptr<Y>& r) const
+ {
+ bool t1 (!p_ == loaded ());
+ bool t2 (!r.p_ == r.loaded ());
+
+ // If both are transient, then compare the underlying pointers.
+ //
+ if (t1 && t2)
+ return p_ == r.p_;
+
+ // If one is transient and the other is persistent, then compare
+ // the underlying pointers but only if they are non NULL. Note
+ // that an unloaded persistent object is always unequal to a
+ // transient object.
+ //
+ if (t1 || t2)
+ return p_ == r.p_ && p_;
+
+ // If both objects are persistent, then we compare databases and
+ // object ids.
+ //
+ typedef typename object_traits<T>::object_type object_type1;
+ typedef typename object_traits<Y>::object_type object_type2;
+
+ return i_.database () == r.i_.database () &&
+ object_id<object_type1> () == r.template object_id<object_type2> ();
+ }
+ }
+}
diff --git a/libodb-boost/odb/boost/smart-ptr/pointer-traits.hxx b/libodb-boost/odb/boost/smart-ptr/pointer-traits.hxx
new file mode 100644
index 0000000..8882822
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr/pointer-traits.hxx
@@ -0,0 +1,110 @@
+// file : odb/boost/smart-ptr/pointer-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_SMART_PTR_POINTER_TRAITS_HXX
+#define ODB_BOOST_SMART_PTR_POINTER_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+
+#include <odb/pointer-traits.hxx>
+#include <odb/details/meta/remove-const.hxx>
+
+namespace odb
+{
+ // Specialization for boost::shared_ptr.
+ //
+ template <typename T>
+ class pointer_traits< ::boost::shared_ptr<T> >
+ {
+ public:
+ static const pointer_kind kind = pk_shared;
+ static const bool lazy = false;
+
+ typedef T element_type;
+ typedef ::boost::shared_ptr<element_type> pointer_type;
+ typedef ::boost::shared_ptr<const element_type> const_pointer_type;
+ typedef typename odb::details::meta::remove_const<element_type>::result
+ unrestricted_element_type;
+ typedef ::boost::shared_ptr<unrestricted_element_type>
+ unrestricted_pointer_type;
+ typedef smart_ptr_guard<pointer_type> guard;
+
+ static element_type*
+ get_ptr (const pointer_type& p)
+ {
+ return p.get ();
+ }
+
+ static element_type&
+ get_ref (const pointer_type& p)
+ {
+ return *p;
+ }
+
+ static bool
+ null_ptr (const pointer_type& p)
+ {
+ return !p;
+ }
+
+ static unrestricted_pointer_type
+ const_pointer_cast (const pointer_type& p)
+ {
+ return ::boost::const_pointer_cast<unrestricted_element_type> (p);
+ }
+
+ template <typename T1>
+ static ::boost::shared_ptr<T1>
+ static_pointer_cast (const pointer_type& p)
+ {
+ return ::boost::static_pointer_cast<T1> (p);
+ }
+
+ template <typename T1>
+ static ::boost::shared_ptr<T1>
+ dynamic_pointer_cast (const pointer_type& p)
+ {
+ return ::boost::dynamic_pointer_cast<T1> (p);
+ }
+
+ public:
+ static void*
+ allocate (std::size_t n)
+ {
+ return operator new (n);
+ }
+
+ static void
+ free (void* p)
+ {
+ operator delete (p);
+ }
+ };
+
+ // Specialization for boost::weak_ptr.
+ //
+ template <typename T>
+ class pointer_traits< ::boost::weak_ptr<T> >
+ {
+ public:
+ static const pointer_kind kind = pk_weak;
+ static const bool lazy = false;
+
+ typedef T element_type;
+ typedef ::boost::weak_ptr<element_type> pointer_type;
+ typedef ::boost::shared_ptr<element_type> strong_pointer_type;
+
+ static strong_pointer_type
+ lock (const pointer_type& p)
+ {
+ return p.lock ();
+ }
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_SMART_PTR_POINTER_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/smart-ptr/wrapper-traits.hxx b/libodb-boost/odb/boost/smart-ptr/wrapper-traits.hxx
new file mode 100644
index 0000000..bc3229d
--- /dev/null
+++ b/libodb-boost/odb/boost/smart-ptr/wrapper-traits.hxx
@@ -0,0 +1,64 @@
+// file : odb/boost/smart-ptr/wrapper-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_SMART_PTR_WRAPPER_TRAITS_HXX
+#define ODB_BOOST_SMART_PTR_WRAPPER_TRAITS_HXX
+
+#include <odb/pre.hxx>
+
+#include <boost/shared_ptr.hpp>
+
+#include <odb/wrapper-traits.hxx>
+
+namespace odb
+{
+ // Specialization for boost::shared_ptr.
+ //
+ template <typename T>
+ class wrapper_traits< ::boost::shared_ptr<T> >
+ {
+ public:
+ typedef T wrapped_type;
+ typedef ::boost::shared_ptr<T> wrapper_type;
+
+ // T can be const.
+ //
+ typedef
+ typename odb::details::meta::remove_const<T>::result
+ unrestricted_wrapped_type;
+
+ static const bool null_handler = true;
+ static const bool null_default = false;
+
+ static bool
+ get_null (const wrapper_type& p)
+ {
+ return !p;
+ }
+
+ static void
+ set_null (wrapper_type& p)
+ {
+ p.reset ();
+ }
+
+ static const wrapped_type&
+ get_ref (const wrapper_type& p)
+ {
+ return *p;
+ }
+
+ static unrestricted_wrapped_type&
+ set_ref (wrapper_type& p)
+ {
+ if (!p)
+ p.reset (new unrestricted_wrapped_type);
+
+ return const_cast<unrestricted_wrapped_type&> (*p);
+ }
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_SMART_PTR_WRAPPER_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/unordered.options b/libodb-boost/odb/boost/unordered.options
new file mode 100644
index 0000000..56ee6c7
--- /dev/null
+++ b/libodb-boost/odb/boost/unordered.options
@@ -0,0 +1,7 @@
+# file : odb/boost/unordered.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+--odb-epilogue '#include <odb/boost/unordered/container-traits.hxx>'
+--hxx-prologue '#include <odb/boost/unordered/container-traits.hxx>'
diff --git a/libodb-boost/odb/boost/unordered/container-traits.hxx b/libodb-boost/odb/boost/unordered/container-traits.hxx
new file mode 100644
index 0000000..7814971
--- /dev/null
+++ b/libodb-boost/odb/boost/unordered/container-traits.hxx
@@ -0,0 +1,275 @@
+// file : odb/boost/unordered/container-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX
+#define ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// Unordered containers are available since 1.36.0.
+//
+#if BOOST_VERSION >= 103600
+
+#include <odb/pre.hxx>
+
+#include <utility> // std::move
+
+#include <boost/unordered_set.hpp>
+#include <boost/unordered_map.hpp>
+
+#include <odb/container-traits.hxx>
+#include <odb/details/config.hxx> // ODB_CXX11
+
+namespace odb
+{
+ // unordered_set
+ //
+ template <typename V, typename H, typename P, typename A>
+ class access::container_traits< ::boost::unordered_set<V, H, P, A> >
+ {
+ public:
+ static const container_kind kind = ck_set;
+ static const bool smart = false;
+
+ typedef ::boost::unordered_set<V, H, P, A> container_type;
+ typedef V value_type;
+
+ typedef set_functions<value_type> functions;
+
+ public:
+ static void
+ persist (const container_type& c, const functions& f)
+ {
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (*i);
+ }
+
+ static void
+ load (container_type& c, bool more, const functions& f)
+ {
+ c.clear ();
+
+ while (more)
+ {
+ value_type v;
+ more = f.select (v);
+#ifdef ODB_CXX11
+ c.insert (std::move (v));
+#else
+ c.insert (v);
+#endif
+ }
+ }
+
+ static void
+ update (const container_type& c, const functions& f)
+ {
+ f.delete_ ();
+
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (*i);
+ }
+
+ static void
+ erase (const functions& f)
+ {
+ f.delete_ ();
+ }
+ };
+
+ // unordered_multiset
+ //
+ // @@ Does multiset preserve insertion order of equal elements? The
+ // current implementation in the generated code does not guarantee
+ // this.
+ //
+ template <typename V, typename H, typename P, typename A>
+ class access::container_traits< ::boost::unordered_multiset<V, H, P, A> >
+ {
+ public:
+ static const container_kind kind = ck_multiset;
+ static const bool smart = false;
+
+ typedef ::boost::unordered_multiset<V, H, P, A> container_type;
+ typedef V value_type;
+
+ typedef set_functions<value_type> functions;
+
+ public:
+ static void
+ persist (const container_type& c, const functions& f)
+ {
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (*i);
+ }
+
+ static void
+ load (container_type& c, bool more, const functions& f)
+ {
+ c.clear ();
+
+ while (more)
+ {
+ value_type v;
+ more = f.select (v);
+#ifdef ODB_CXX11
+ c.insert (std::move (v));
+#else
+ c.insert (v);
+#endif
+ }
+ }
+
+ static void
+ update (const container_type& c, const functions& f)
+ {
+ f.delete_ ();
+
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (*i);
+ }
+
+ static void
+ erase (const functions& f)
+ {
+ f.delete_ ();
+ }
+ };
+
+ // unordered_map
+ //
+ template <typename K, typename V, typename H, typename P, typename A>
+ class access::container_traits< ::boost::unordered_map<K, V, H, P, A> >
+ {
+ public:
+ static const container_kind kind = ck_map;
+ static const bool smart = false;
+
+ typedef ::boost::unordered_map<K, V, H, P, A> container_type;
+
+ typedef K key_type;
+ typedef V value_type;
+ typedef typename container_type::value_type pair_type;
+
+ typedef map_functions<key_type, value_type> functions;
+
+ public:
+ static void
+ persist (const container_type& c, const functions& f)
+ {
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (i->first, i->second);
+ }
+
+ static void
+ load (container_type& c, bool more, const functions& f)
+ {
+ c.clear ();
+
+ while (more)
+ {
+ key_type k;
+ value_type v;
+ more = f.select (k, v);
+
+#ifdef ODB_CXX11
+ c.insert (pair_type (std::move (k), std::move (v)));
+#else
+ c.insert (pair_type (k, v));
+#endif
+ }
+ }
+
+ static void
+ update (const container_type& c, const functions& f)
+ {
+ f.delete_ ();
+
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (i->first, i->second);
+ }
+
+ static void
+ erase (const functions& f)
+ {
+ f.delete_ ();
+ }
+ };
+
+ // unordered_multimap
+ //
+ // @@ Does multimap preserve insertion order of equal elements? The
+ // current implementation in the generated code does not guarantee
+ // this.
+ //
+ template <typename K, typename V, typename H, typename P, typename A>
+ class access::container_traits< ::boost::unordered_multimap<K, V, H, P, A> >
+ {
+ public:
+ static const container_kind kind = ck_multimap;
+ static const bool smart = false;
+
+ typedef ::boost::unordered_multimap<K, V, H, P, A> container_type;
+
+ typedef K key_type;
+ typedef V value_type;
+ typedef typename container_type::value_type pair_type;
+
+ typedef map_functions<key_type, value_type> functions;
+
+ public:
+ static void
+ persist (const container_type& c, const functions& f)
+ {
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (i->first, i->second);
+ }
+
+ static void
+ load (container_type& c, bool more, const functions& f)
+ {
+ c.clear ();
+
+ while (more)
+ {
+ key_type k;
+ value_type v;
+ more = f.select (k, v);
+
+#ifdef ODB_CXX11
+ c.insert (pair_type (std::move (k), std::move (v)));
+#else
+ c.insert (pair_type (k, v));
+#endif
+ }
+ }
+
+ static void
+ update (const container_type& c, const functions& f)
+ {
+ f.delete_ ();
+
+ for (typename container_type::const_iterator i (c.begin ()),
+ e (c.end ()); i != e; ++i)
+ f.insert (i->first, i->second);
+ }
+
+ static void
+ erase (const functions& f)
+ {
+ f.delete_ ();
+ }
+ };
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UNORDERED_CONTAINER_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/uuid.options b/libodb-boost/odb/boost/uuid.options
new file mode 100644
index 0000000..8b77aa6
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid.options
@@ -0,0 +1,4 @@
+# file : odb/boost/uuid.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/uuid/uuid
diff --git a/libodb-boost/odb/boost/uuid/mssql/uuid-mapping.hxx b/libodb-boost/odb/boost/uuid/mssql/uuid-mapping.hxx
new file mode 100644
index 0000000..8da4c7d
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/mssql/uuid-mapping.hxx
@@ -0,0 +1,22 @@
+// file : odb/boost/uuid/mssql/uuid-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_MSSQL_UUID_MAPPING_HXX
+#define ODB_BOOST_UUID_MSSQL_UUID_MAPPING_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <boost/uuid/uuid.hpp>
+
+// By default map boost::uuids::uuid to SQL Server UNIQUEIDENTIFIER and
+// use NULL to represent nil UUIDs. If NULL is disabled (e.g., at the
+// member level), then we store the nil UUID (i.e., all bytes are zero).
+//
+#pragma db value(boost::uuids::uuid) type("UNIQUEIDENTIFIER") null
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_MSSQL_UUID_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/uuid/mssql/uuid-traits.hxx b/libodb-boost/odb/boost/uuid/mssql/uuid-traits.hxx
new file mode 100644
index 0000000..ead1d85
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/mssql/uuid-traits.hxx
@@ -0,0 +1,65 @@
+// file : odb/boost/uuid/mssql/uuid-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_MSSQL_UUID_TRAITS_HXX
+#define ODB_BOOST_UUID_MSSQL_UUID_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <odb/pre.hxx>
+
+#include <cstring> // std::memcpy, std::memset
+
+#include <boost/uuid/uuid.hpp>
+
+#include <odb/mssql/traits.hxx>
+
+namespace odb
+{
+ namespace mssql
+ {
+ template <>
+ class default_value_traits< ::boost::uuids::uuid, id_uniqueidentifier>
+ {
+ public:
+ typedef ::boost::uuids::uuid value_type;
+ typedef value_type query_type;
+ typedef uniqueidentifier image_type;
+
+ static void
+ set_value (value_type& v, const uniqueidentifier& i, bool is_null)
+ {
+ if (!is_null)
+ std::memcpy (v.data, &i, 16);
+ else
+ std::memset (v.data, 0, 16);
+ }
+
+ static void
+ set_image (uniqueidentifier& i, bool& is_null, const value_type& v)
+ {
+ // If we can, store nil as NULL. Otherwise, store it as a value.
+ //
+ is_null = is_null && v.is_nil ();
+
+ if (!is_null)
+ std::memcpy (&i, v.data, 16);
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::uuids::uuid>
+ {
+ static const database_type_id db_type_id = id_uniqueidentifier;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_MSSQL_UUID_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/uuid/mysql/uuid-mapping.hxx b/libodb-boost/odb/boost/uuid/mysql/uuid-mapping.hxx
new file mode 100644
index 0000000..a1de637
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/mysql/uuid-mapping.hxx
@@ -0,0 +1,22 @@
+// file : odb/boost/uuid/mysql/uuid-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_MYSQL_UUID_MAPPING_HXX
+#define ODB_BOOST_UUID_MYSQL_UUID_MAPPING_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <boost/uuid/uuid.hpp>
+
+// By default map boost::uuids::uuid to MySQL BINARY(16) and use NULL to
+// represent nil UUIDs. If NULL is disabled (e.g., at the member level),
+// then we store the nil UUID (i.e., all bytes are zero).
+//
+#pragma db value(boost::uuids::uuid) type("BINARY(16)") null
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_MYSQL_UUID_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/uuid/mysql/uuid-traits.hxx b/libodb-boost/odb/boost/uuid/mysql/uuid-traits.hxx
new file mode 100644
index 0000000..b2ce1b0
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/mysql/uuid-traits.hxx
@@ -0,0 +1,81 @@
+// file : odb/boost/uuid/mysql/uuid-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_MYSQL_UUID_TRAITS_HXX
+#define ODB_BOOST_UUID_MYSQL_UUID_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <odb/pre.hxx>
+
+#include <cstring> // std::memcpy, std::memset
+#include <cassert>
+
+#include <boost/uuid/uuid.hpp>
+
+#include <odb/mysql/traits.hxx>
+
+namespace odb
+{
+ namespace mysql
+ {
+ template <>
+ struct default_value_traits< ::boost::uuids::uuid, id_blob>
+ {
+ typedef ::boost::uuids::uuid value_type;
+ typedef value_type query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (value_type& v,
+ const details::buffer& b,
+ std::size_t n,
+ bool is_null)
+ {
+ if (!is_null)
+ {
+ assert (n == 16);
+ std::memcpy (v.data, b.data (), 16);
+ }
+ else
+ std::memset (v.data, 0, 16);
+ }
+
+ static void
+ set_image (details::buffer& b,
+ std::size_t& n,
+ bool& is_null,
+ const value_type& v)
+ {
+ // If we can, store nil as NULL. Otherwise, store it as a value.
+ //
+ is_null = is_null && v.is_nil ();
+
+ if (!is_null)
+ {
+ n = 16;
+
+ if (n > b.capacity ())
+ b.capacity (n);
+
+ std::memcpy (b.data (), v.data, n);
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::uuids::uuid>
+ {
+ static const database_type_id db_type_id = id_blob;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_MYSQL_UUID_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/uuid/oracle/uuid-mapping.hxx b/libodb-boost/odb/boost/uuid/oracle/uuid-mapping.hxx
new file mode 100644
index 0000000..bd49122
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/oracle/uuid-mapping.hxx
@@ -0,0 +1,22 @@
+// file : odb/boost/uuid/oracle/uuid-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_ORACLE_UUID_MAPPING_HXX
+#define ODB_BOOST_UUID_ORACLE_UUID_MAPPING_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <boost/uuid/uuid.hpp>
+
+// By default map boost::uuids::uuid to Oracle RAW(16) and use NULL to
+// represent nil UUIDs. If NULL is disabled (e.g., at the member level),
+// then we store the nil UUID (i.e., all bytes are zero).
+//
+#pragma db value(boost::uuids::uuid) type("RAW(16)") null
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_ORACLE_UUID_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/uuid/oracle/uuid-traits.hxx b/libodb-boost/odb/boost/uuid/oracle/uuid-traits.hxx
new file mode 100644
index 0000000..d1ced34
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/oracle/uuid-traits.hxx
@@ -0,0 +1,77 @@
+// file : odb/boost/uuid/oracle/uuid-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_ORACLE_UUID_TRAITS_HXX
+#define ODB_BOOST_UUID_ORACLE_UUID_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <odb/pre.hxx>
+
+#include <cstring> // std::memcpy, std::memset
+#include <cassert>
+
+#include <boost/uuid/uuid.hpp>
+
+#include <odb/oracle/traits.hxx>
+
+namespace odb
+{
+ namespace oracle
+ {
+ template <>
+ struct default_value_traits< ::boost::uuids::uuid, id_raw>
+ {
+ public:
+ typedef ::boost::uuids::uuid value_type;
+ typedef value_type query_type;
+ typedef char* image_type;
+
+ static void
+ set_value (value_type& v, const char* b, std::size_t n, bool is_null)
+ {
+ if (!is_null)
+ {
+ assert (n == 16);
+ std::memcpy (v.data, b, 16);
+ }
+ else
+ std::memset (v.data, 0, 16);
+ }
+
+ static void
+ set_image (char* b,
+ std::size_t c,
+ std::size_t& n,
+ bool& is_null,
+ const value_type& v)
+ {
+ // If we can, store nil as NULL. Otherwise, store it as a value.
+ //
+ is_null = is_null && v.is_nil ();
+
+ if (!is_null)
+ {
+ n = 16;
+ assert (c >= n);
+ std::memcpy (b, v.data, n);
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::uuids::uuid>
+ {
+ static const database_type_id db_type_id = id_raw;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_ORACLE_UUID_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/uuid/pgsql/uuid-mapping.hxx b/libodb-boost/odb/boost/uuid/pgsql/uuid-mapping.hxx
new file mode 100644
index 0000000..517dfa6
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/pgsql/uuid-mapping.hxx
@@ -0,0 +1,22 @@
+// file : odb/boost/uuid/pgsql/uuid-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_PGSQL_UUID_MAPPING_HXX
+#define ODB_BOOST_UUID_PGSQL_UUID_MAPPING_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <boost/uuid/uuid.hpp>
+
+// By default map boost::uuids::uuid to PostgreSQL UUID and use NULL to
+// represent nil UUIDs. If NULL is disabled (e.g., at the member level),
+// then we store the nil UUID (i.e., all bytes are zero).
+//
+#pragma db value(boost::uuids::uuid) type("UUID") null
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_PGSQL_UUID_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/uuid/pgsql/uuid-traits.hxx b/libodb-boost/odb/boost/uuid/pgsql/uuid-traits.hxx
new file mode 100644
index 0000000..482ca0e
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/pgsql/uuid-traits.hxx
@@ -0,0 +1,70 @@
+// file : odb/boost/uuid/pgsql/uuid-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_PGSQL_UUID_TRAITS_HXX
+#define ODB_BOOST_UUID_PGSQL_UUID_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <odb/pre.hxx>
+
+#include <cstring> // std::memcpy, std::memset
+
+#include <boost/uuid/uuid.hpp>
+
+#include <odb/pgsql/traits.hxx>
+
+namespace odb
+{
+ namespace pgsql
+ {
+ template <>
+ class default_value_traits< ::boost::uuids::uuid, id_uuid>
+ {
+ public:
+ typedef ::boost::uuids::uuid value_type;
+ typedef value_type query_type;
+ typedef unsigned char* image_type;
+
+ // PostgreSQL binary UUID representation is big-endian in the RFC 4122,
+ // section 4.1.2 order. Lucky for us, that also the representation used
+ // by Boost.
+ //
+
+ static void
+ set_value (value_type& v, const unsigned char* i, bool is_null)
+ {
+ if (!is_null)
+ std::memcpy (v.data, i, 16);
+ else
+ std::memset (v.data, 0, 16);
+ }
+
+ static void
+ set_image (unsigned char* i, bool& is_null, const value_type& v)
+ {
+ // If we can, store nil as NULL. Otherwise, store it as a value.
+ //
+ is_null = is_null && v.is_nil ();
+
+ if (!is_null)
+ std::memcpy (i, v.data, 16);
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::uuids::uuid>
+ {
+ static const database_type_id db_type_id = id_uuid;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_PGSQL_UUID_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/uuid/sqlite/uuid-mapping.hxx b/libodb-boost/odb/boost/uuid/sqlite/uuid-mapping.hxx
new file mode 100644
index 0000000..3fe2b6e
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/sqlite/uuid-mapping.hxx
@@ -0,0 +1,22 @@
+// file : odb/boost/uuid/sqlite/uuid-mapping.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_SQLITE_UUID_MAPPING_HXX
+#define ODB_BOOST_UUID_SQLITE_UUID_MAPPING_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <boost/uuid/uuid.hpp>
+
+// By default map boost::uuids::uuid to SQLite BLOB and use NULL to
+// represent nil UUIDs. If NULL is disabled (e.g., at the member level),
+// then we store the nil UUID (i.e., all bytes are zero).
+//
+#pragma db value(boost::uuids::uuid) type("BLOB") null
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_SQLITE_UUID_MAPPING_HXX
diff --git a/libodb-boost/odb/boost/uuid/sqlite/uuid-traits.hxx b/libodb-boost/odb/boost/uuid/sqlite/uuid-traits.hxx
new file mode 100644
index 0000000..7a333c8
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/sqlite/uuid-traits.hxx
@@ -0,0 +1,81 @@
+// file : odb/boost/uuid/sqlite/uuid-traits.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_BOOST_UUID_SQLITE_UUID_TRAITS_HXX
+#define ODB_BOOST_UUID_SQLITE_UUID_TRAITS_HXX
+
+#include <boost/version.hpp>
+
+// UUID library is available since 1.42.0.
+//
+#if BOOST_VERSION >= 104200
+
+#include <odb/pre.hxx>
+
+#include <cstring> // std::memcpy, std::memset
+#include <cassert>
+
+#include <boost/uuid/uuid.hpp>
+
+#include <odb/sqlite/traits.hxx>
+
+namespace odb
+{
+ namespace sqlite
+ {
+ template <>
+ struct default_value_traits< ::boost::uuids::uuid, id_blob>
+ {
+ typedef ::boost::uuids::uuid value_type;
+ typedef value_type query_type;
+ typedef details::buffer image_type;
+
+ static void
+ set_value (value_type& v,
+ const details::buffer& b,
+ std::size_t n,
+ bool is_null)
+ {
+ if (!is_null)
+ {
+ assert (n == 16);
+ std::memcpy (v.data, b.data (), 16);
+ }
+ else
+ std::memset (v.data, 0, 16);
+ }
+
+ static void
+ set_image (details::buffer& b,
+ std::size_t& n,
+ bool& is_null,
+ const value_type& v)
+ {
+ // If we can, store nil as NULL. Otherwise, store it as a value.
+ //
+ is_null = is_null && v.is_nil ();
+
+ if (!is_null)
+ {
+ n = 16;
+
+ if (n > b.capacity ())
+ b.capacity (n);
+
+ std::memcpy (b.data (), v.data, n);
+ }
+ }
+ };
+
+ template <>
+ struct default_type_traits< ::boost::uuids::uuid>
+ {
+ static const database_type_id db_type_id = id_blob;
+ };
+ }
+}
+
+#include <odb/post.hxx>
+
+#endif // BOOST_VERSION
+#endif // ODB_BOOST_UUID_SQLITE_UUID_TRAITS_HXX
diff --git a/libodb-boost/odb/boost/uuid/uuid-common.options b/libodb-boost/odb/boost/uuid/uuid-common.options
new file mode 100644
index 0000000..3d9fa50
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/uuid-common.options
@@ -0,0 +1,4 @@
+# file : odb/boost/uuid/uuid-common.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
diff --git a/libodb-boost/odb/boost/uuid/uuid-mssql.options b/libodb-boost/odb/boost/uuid/uuid-mssql.options
new file mode 100644
index 0000000..f6a8144
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/uuid-mssql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/uuid/uuid-mssql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/uuid/mssql/uuid-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/uuid/mssql/uuid-traits.hxx>'
diff --git a/libodb-boost/odb/boost/uuid/uuid-mysql.options b/libodb-boost/odb/boost/uuid/uuid-mysql.options
new file mode 100644
index 0000000..889a452
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/uuid-mysql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/uuid/uuid-mysql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/uuid/mysql/uuid-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/uuid/mysql/uuid-traits.hxx>'
diff --git a/libodb-boost/odb/boost/uuid/uuid-oracle.options b/libodb-boost/odb/boost/uuid/uuid-oracle.options
new file mode 100644
index 0000000..3022dbf
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/uuid-oracle.options
@@ -0,0 +1,11 @@
+# file : odb/boost/uuid/uuid-oracle.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/uuid/oracle/uuid-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/uuid/oracle/uuid-traits.hxx>'
diff --git a/libodb-boost/odb/boost/uuid/uuid-pgsql.options b/libodb-boost/odb/boost/uuid/uuid-pgsql.options
new file mode 100644
index 0000000..63268dc
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/uuid-pgsql.options
@@ -0,0 +1,11 @@
+# file : odb/boost/uuid/uuid-pgsql.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/uuid/pgsql/uuid-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/uuid/pgsql/uuid-traits.hxx>'
diff --git a/libodb-boost/odb/boost/uuid/uuid-sqlite.options b/libodb-boost/odb/boost/uuid/uuid-sqlite.options
new file mode 100644
index 0000000..ea515e9
--- /dev/null
+++ b/libodb-boost/odb/boost/uuid/uuid-sqlite.options
@@ -0,0 +1,11 @@
+# file : odb/boost/uuid/uuid-sqlite.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+--profile boost/version
+
+# Include the default mapping in prologue instead of epilogue to
+# allow the user to override the default mapping.
+#
+--odb-prologue '#include <odb/boost/uuid/sqlite/uuid-mapping.hxx>'
+
+--hxx-prologue '#include <odb/boost/uuid/sqlite/uuid-traits.hxx>'
diff --git a/libodb-boost/odb/boost/version-build2-stub.hxx b/libodb-boost/odb/boost/version-build2-stub.hxx
new file mode 100644
index 0000000..e29f23c
--- /dev/null
+++ b/libodb-boost/odb/boost/version-build2-stub.hxx
@@ -0,0 +1,4 @@
+// file : odb/boost/version-build2-stub.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#include <odb/boost/version.hxx>
diff --git a/libodb-boost/odb/boost/version-build2.hxx b/libodb-boost/odb/boost/version-build2.hxx
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libodb-boost/odb/boost/version-build2.hxx
diff --git a/libodb-boost/odb/boost/version-build2.hxx.in b/libodb-boost/odb/boost/version-build2.hxx.in
new file mode 100644
index 0000000..37a1ffc
--- /dev/null
+++ b/libodb-boost/odb/boost/version-build2.hxx.in
@@ -0,0 +1,46 @@
+// file : odb/boost/version-build2.hxx.in
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef LIBODB_BOOST_VERSION // Note: using the version macro itself.
+
+// @@ TODO: need to derive automatically (it is also hardcoded in *.options).
+//
+#define ODB_BOOST_VERSION 2047600
+
+// The numeric version format is AAAAABBBBBCCCCCDDDE where:
+//
+// AAAAA - major version number
+// BBBBB - minor version number
+// CCCCC - bugfix version number
+// DDD - alpha / beta (DDD + 500) version number
+// E - final (0) / snapshot (1)
+//
+// When DDDE is not 0, 1 is subtracted from AAAAABBBBBCCCCC. For example:
+//
+// Version AAAAABBBBBCCCCCDDDE
+//
+// 0.1.0 0000000001000000000
+// 0.1.2 0000000001000020000
+// 1.2.3 0000100002000030000
+// 2.2.0-a.1 0000200001999990010
+// 3.0.0-b.2 0000299999999995020
+// 2.2.0-a.1.z 0000200001999990011
+//
+#define LIBODB_BOOST_VERSION $libodb_boost.version.project_number$ULL
+#define LIBODB_BOOST_VERSION_STR "$libodb_boost.version.project$"
+#define LIBODB_BOOST_VERSION_ID "$libodb_boost.version.project_id$"
+
+#define LIBODB_BOOST_VERSION_MAJOR $libodb_boost.version.major$
+#define LIBODB_BOOST_VERSION_MINOR $libodb_boost.version.minor$
+#define LIBODB_BOOST_VERSION_PATCH $libodb_boost.version.patch$
+
+#define LIBODB_BOOST_PRE_RELEASE $libodb_boost.version.pre_release$
+
+#define LIBODB_BOOST_SNAPSHOT $libodb_boost.version.snapshot_sn$ULL
+#define LIBODB_BOOST_SNAPSHOT_ID "$libodb_boost.version.snapshot_id$"
+
+#include <odb/version.hxx>
+
+$libodb.check(LIBODB_VERSION, LIBODB_SNAPSHOT)$
+
+#endif // LIBODB_BOOST_VERSION
diff --git a/libodb-boost/odb/boost/version.hxx b/libodb-boost/odb/boost/version.hxx
new file mode 100644
index 0000000..c46e21a
--- /dev/null
+++ b/libodb-boost/odb/boost/version.hxx
@@ -0,0 +1,55 @@
+// file : odb/boost/version.hxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifdef LIBODB_BOOST_BUILD2
+# include <odb/boost/version-build2.hxx>
+#else
+
+#ifndef ODB_BOOST_VERSION_HXX
+#define ODB_BOOST_VERSION_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/version.hxx>
+
+// Version format is AABBCCDD where
+//
+// AA - major version number
+// BB - minor version number
+// CC - bugfix version number
+// DD - alpha / beta (DD + 50) version number
+//
+// When DD is not 00, 1 is subtracted from AABBCC. For example:
+//
+// Version AABBCCDD
+// 2.0.0 02000000
+// 2.1.0 02010000
+// 2.1.1 02010100
+// 2.2.0.a1 02019901
+// 3.0.0.b2 02999952
+//
+
+// Check that we have compatible ODB version.
+//
+#if ODB_VERSION != 20476
+# error incompatible odb interface version detected
+#endif
+
+// ODB Boost interface version: odb interface version plus the Boost interface
+// version.
+//
+#define ODB_BOOST_VERSION 2047600
+#define ODB_BOOST_VERSION_STR "2.5.0-b.26"
+
+// libodb-boost version: odb interface version plus the bugfix version. Note
+// that LIBODB_BOOST_VERSION is always greater or equal to ODB_BOOST_VERSION
+// since if the Boost interface virsion is incremented then the bugfix version
+// must be incremented as well.
+//
+#define LIBODB_BOOST_VERSION 2049976
+#define LIBODB_BOOST_VERSION_STR "2.5.0-b.26"
+
+#include <odb/post.hxx>
+
+#endif // ODB_BOOST_VERSION_HXX
+#endif // LIBODB_BOOST_BUILD2
diff --git a/libodb-boost/odb/boost/version.options b/libodb-boost/odb/boost/version.options
new file mode 100644
index 0000000..904dcc5
--- /dev/null
+++ b/libodb-boost/odb/boost/version.options
@@ -0,0 +1,12 @@
+# file : odb/boost/version.options
+# license : GNU GPL v2; see accompanying LICENSE file
+
+# Make sure the options files as seen by the ODB compiler and header
+# files as seen by the C++ compiler have the same Boost interface
+# version.
+#
+--hxx-prologue '#include <odb/boost/version.hxx>'
+
+--hxx-prologue '#if ODB_BOOST_VERSION != 2047600 // 2.5.0-b.26'
+--hxx-prologue '# error ODB and C++ compilers see different libodb-boost interface versions'
+--hxx-prologue '#endif'
diff --git a/libodb-boost/tests/.gitignore b/libodb-boost/tests/.gitignore
new file mode 100644
index 0000000..e54525b
--- /dev/null
+++ b/libodb-boost/tests/.gitignore
@@ -0,0 +1 @@
+driver
diff --git a/libodb-boost/tests/basics/buildfile b/libodb-boost/tests/basics/buildfile
new file mode 100644
index 0000000..c148079
--- /dev/null
+++ b/libodb-boost/tests/basics/buildfile
@@ -0,0 +1,6 @@
+# file : tests/basics/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+import libs = libodb-boost%lib{odb-boost}
+
+exe{driver}: {hxx cxx}{*} $libs
diff --git a/libodb-boost/tests/basics/driver.cxx b/libodb-boost/tests/basics/driver.cxx
new file mode 100644
index 0000000..a9c9c3d
--- /dev/null
+++ b/libodb-boost/tests/basics/driver.cxx
@@ -0,0 +1,22 @@
+// file : tests/basics/driver.cxx
+// license : GNU GPL v2; see accompanying LICENSE file
+
+// Basic test to make sure the library is usable. Functionality testing
+// is done in the odb-tests package.
+
+#include <odb/boost/exception.hxx>
+#include <odb/boost/date-time/exceptions.hxx>
+
+using namespace odb;
+
+int
+main ()
+{
+ try
+ {
+ throw boost::date_time::value_out_of_range ();
+ }
+ catch (const boost::exception&)
+ {
+ }
+}
diff --git a/libodb-boost/tests/build/.gitignore b/libodb-boost/tests/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/libodb-boost/tests/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/libodb-boost/tests/build/bootstrap.build b/libodb-boost/tests/build/bootstrap.build
new file mode 100644
index 0000000..6ee38db
--- /dev/null
+++ b/libodb-boost/tests/build/bootstrap.build
@@ -0,0 +1,8 @@
+# file : tests/build/bootstrap.build
+# license : GNU GPL v2; see accompanying LICENSE file
+
+project = # Unnamed subproject.
+
+using config
+using dist
+using test
diff --git a/libodb-boost/tests/build/root.build b/libodb-boost/tests/build/root.build
new file mode 100644
index 0000000..6c5a90b
--- /dev/null
+++ b/libodb-boost/tests/build/root.build
@@ -0,0 +1,23 @@
+# file : tests/build/root.build
+# license : GNU GPL v2; see accompanying LICENSE file
+
+cxx.std = latest
+
+using cxx
+
+hxx{*}: extension = hxx
+cxx{*}: extension = cxx
+
+if ($cxx.target.system == 'win32-msvc')
+ cxx.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($cxx.class == 'msvc')
+ cxx.coptions += /wd4251 /wd4275 /wd4800
+
+# Every exe{} in this subproject is by default a test.
+#
+exe{*}: test = true
+
+# Specify the test target for cross-testing.
+#
+test.target = $cxx.target
diff --git a/libodb-boost/tests/buildfile b/libodb-boost/tests/buildfile
new file mode 100644
index 0000000..57588a4
--- /dev/null
+++ b/libodb-boost/tests/buildfile
@@ -0,0 +1,4 @@
+# file : tests/buildfile
+# license : GNU GPL v2; see accompanying LICENSE file
+
+./: {*/ -build/}