|
|
|||
File indexing completed on 2025-12-16 09:58:26
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_COLUMN_TYPE_HPP 0009 #define BOOST_MYSQL_COLUMN_TYPE_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 database type of a MySQL column. 0020 * \details This represents a database type, as opposed to \ref field_kind, which represents a 0021 * C++ type. 0022 *\n 0023 * Unless otherwise noted, the names in this enumeration 0024 * directly correspond to the names of the types you would use in 0025 * a `CREATE TABLE` statement to create a column of this type 0026 * (e.g. `VARCHAR` corresponds to \ref column_type::varchar). 0027 */ 0028 enum class column_type 0029 { 0030 tinyint, ///< `TINYINT` (signed and unsigned). 0031 smallint, ///< `SMALLINT` (signed and unsigned). 0032 mediumint, ///< `MEDIUMINT` (signed and unsigned). 0033 int_, ///< `INT` (signed and unsigned). 0034 bigint, ///< `BIGINT` (signed and unsigned). 0035 float_, ///< `FLOAT` (warning: FLOAT(p) where p >= 24 creates a DOUBLE column). 0036 double_, ///< `DOUBLE` 0037 decimal, ///< `DECIMAL` 0038 bit, ///< `BIT` 0039 year, ///< `YEAR` 0040 time, ///< `TIME` 0041 date, ///< `DATE` 0042 datetime, ///< `DATETIME` 0043 timestamp, ///< `TIMESTAMP` 0044 char_, ///< `CHAR` (any length) 0045 varchar, ///< `VARCHAR` (any length) 0046 binary, ///< `BINARY` (any length) 0047 varbinary, ///< `VARBINARY` (any length) 0048 text, ///< `TEXT` types (`TINYTEXT`, `MEDIUMTEXT`, `TEXT` and `LONGTEXT`) 0049 blob, ///< `BLOB` types (`TINYBLOB`, `MEDIUMBLOB`, `BLOB` and `LONGBLOB`) 0050 enum_, ///< `ENUM` 0051 set, ///< `SET` 0052 json, ///< `JSON` 0053 geometry, ///< `GEOMETRY` 0054 unknown, ///< None of the known types; maybe a new MySQL type we have no knowledge of. 0055 }; 0056 0057 /** 0058 * \brief Streams a `column_type`. 0059 */ 0060 BOOST_MYSQL_DECL 0061 std::ostream& operator<<(std::ostream& os, column_type t); 0062 0063 } // namespace mysql 0064 } // namespace boost 0065 0066 #ifdef BOOST_MYSQL_HEADER_ONLY 0067 #include <boost/mysql/impl/column_type.ipp> 0068 #endif 0069 0070 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|