Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:58:33

0001 //
0002 // Copyright (c) 2019-2025 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
0003 //
0004 // Distributed under the Boost Software License, Version 1.0. (See accompanying
0005 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 //
0007 
0008 #ifndef BOOST_MYSQL_FIELD_KIND_HPP
0009 #define BOOST_MYSQL_FIELD_KIND_HPP
0010 
0011 #include <boost/mysql/detail/config.hpp>
0012 
0013 #include <iosfwd>
0014 
0015 namespace boost {
0016 namespace mysql {
0017 
0018 /**
0019  * \brief Represents the possible C++ types a `field` or `field_view` may have.
0020  */
0021 enum class field_kind
0022 {
0023     // Order here is important
0024 
0025     /// Any of the below when the value is NULL
0026     null = 0,
0027 
0028     /// The field contains a `std::int64_t`.
0029     int64,
0030 
0031     /// The field contains a `std::uint64_t`.
0032     uint64,
0033 
0034     /**
0035      * \brief The field contains a string (`std::string` for `field` and \ref string_view for
0036      * `field_view`).
0037      */
0038     string,
0039 
0040     /**
0041      * \brief The field contains a binary string (\ref blob for `field` and \ref blob_view for
0042      * `field_view`).
0043      */
0044     blob,
0045 
0046     /// The field contains a `float`.
0047     float_,
0048 
0049     /// The field contains a `double`.
0050     double_,
0051 
0052     /// The field contains a \ref date.
0053     date,
0054 
0055     /// The field contains a \ref datetime.
0056     datetime,
0057 
0058     /// The field contains a \ref time.
0059     time
0060 };
0061 
0062 /**
0063  * \brief Streams a field_kind.
0064  */
0065 BOOST_MYSQL_DECL
0066 std::ostream& operator<<(std::ostream& os, field_kind v);
0067 
0068 }  // namespace mysql
0069 }  // namespace boost
0070 
0071 #ifdef BOOST_MYSQL_HEADER_ONLY
0072 #include <boost/mysql/impl/field_kind.ipp>
0073 #endif
0074 
0075 #endif