X Tutup
// NpgsqlTypes.NpgsqlDbType.cs // // Author: // Francisco Jr. (fxjrlists@yahoo.com.br) // // Copyright (C) 2002 The Npgsql Development Team // npgsql-general@gborg.postgresql.org // http://gborg.postgresql.org/project/npgsql/projdisplay.php // // Permission to use, copy, modify, and distribute this software and its // documentation for any purpose, without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph and the following two paragraphs appear in all copies. // // IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY // FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, // INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS // DOCUMENTATION, EVEN IF THE NPGSQL DEVELOPMENT TEAM HAS BEEN ADVISED OF // THE POSSIBILITY OF SUCH DAMAGE. // // THE NPGSQL DEVELOPMENT TEAM SPECIFICALLY DISCLAIMS ANY WARRANTIES, // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY // AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS // ON AN "AS IS" BASIS, AND THE NPGSQL DEVELOPMENT TEAM HAS NO OBLIGATIONS // TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. using System; using Npgsql; // ReSharper disable once CheckNamespace namespace NpgsqlTypes { /// /// Represents a PostgreSQL data type that can be written or read to the database. /// Used in places such as to unambiguously specify /// how to encode or decode values. /// /// See http://www.postgresql.org/docs/current/static/datatype.html public enum NpgsqlDbType { // Note that it's important to never change the numeric values of this enum, since user applications // compile them in. #region Numeric Types /// /// Corresponds to the PostgreSQL 8-byte "bigint" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-numeric.html Bigint = 1, /// /// Corresponds to the PostgreSQL 8-byte floating-point "double" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-numeric.html Double = 8, /// /// Corresponds to the PostgreSQL 4-byte "integer" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-numeric.html Integer = 9, /// /// Corresponds to the PostgreSQL arbitrary-precision "numeric" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-numeric.html Numeric = 13, /// /// Corresponds to the PostgreSQL floating-point "real" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-numeric.html Real = 17, /// /// Corresponds to the PostgreSQL 2-byte "smallint" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-numeric.html Smallint = 18, #endregion #region Boolean Type /// /// Corresponds to the PostgreSQL "boolean" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-boolean.html Boolean = 2, #endregion #region Enumerated Types /// /// Corresponds to the PostgreSQL "enum" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-enum.html Enum = 47, #endregion #region Geometric types /// /// Corresponds to the PostgreSQL geometric "box" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html Box = 3, /// /// Corresponds to the PostgreSQL geometric "circle" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html Circle = 5, /// /// Corresponds to the PostgreSQL geometric "line" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html Line = 10, /// /// Corresponds to the PostgreSQL geometric "lseg" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html LSeg = 11, /// /// Corresponds to the PostgreSQL geometric "path" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html Path = 14, /// /// Corresponds to the PostgreSQL geometric "point" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html Point = 15, /// /// Corresponds to the PostgreSQL geometric "polygon" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-geometric.html Polygon = 16, #endregion #region Monetary Types /// /// Corresponds to the PostgreSQL "money" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-money.html Money = 12, #endregion #region Character Types /// /// Corresponds to the PostgreSQL "char(n)"type. /// /// See http://www.postgresql.org/docs/current/static/datatype-character.html Char = 6, /// /// Corresponds to the PostgreSQL "text" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-character.html Text = 19, /// /// Corresponds to the PostgreSQL "varchar" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-character.html Varchar = 22, /// /// Corresponds to the PostgreSQL internal "name" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-character.html Name = 32, /// /// Corresponds to the PostgreSQL "char" type. /// /// /// This is an internal field and should normally not be used for regular applications. /// /// See http://www.postgresql.org/docs/current/static/datatype-text.html /// InternalChar = 38, #endregion #region Binary Data Types /// /// Corresponds to the PostgreSQL "bytea" type, holding a raw byte string. /// /// See http://www.postgresql.org/docs/current/static/datatype-binary.html Bytea = 4, #endregion #region Date/Time Types /// /// Corresponds to the PostgreSQL "date" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html Date = 7, /// /// Corresponds to the PostgreSQL "time" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html Time = 20, /// /// Corresponds to the PostgreSQL "timestamp" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html Timestamp = 21, /// /// Corresponds to the PostgreSQL "timestamp with time zone" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html TimestampTZ = 26, /// /// Corresponds to the PostgreSQL "interval" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html Interval = 30, /// /// Corresponds to the PostgreSQL "time with time zone" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html TimeTZ = 31, /// /// Corresponds to the obsolete PostgreSQL "abstime" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-datetime.html [Obsolete] Abstime = 33, #endregion #region Network Address Types /// /// Corresponds to the PostgreSQL "inet" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-net-types.html Inet = 24, /// /// Corresponds to the PostgreSQL "cidr" type, a field storing an IPv4 or IPv6 network. /// /// See http://www.postgresql.org/docs/current/static/datatype-net-types.html Cidr = 44, /// /// Corresponds to the PostgreSQL "macaddr" type, a field storing a 6-byte physical address. /// /// See http://www.postgresql.org/docs/current/static/datatype-net-types.html MacAddr = 34, #endregion #region Bit String Types /// /// Corresponds to the PostgreSQL "bit" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-bit.html Bit = 25, /// /// Corresponds to the PostgreSQL "varbit" type, a field storing a variable-length string of bits. /// /// See http://www.postgresql.org/docs/current/static/datatype-boolean.html Varbit = 39, #endregion #region Text Search Types /// /// Corresponds to the PostgreSQL "tsvector" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-textsearch.html TsVector = 45, /// /// Corresponds to the PostgreSQL "tsquery" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-textsearch.html TsQuery = 46, #endregion #region UUID Type /// /// Corresponds to the PostgreSQL "uuid" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-uuid.html Uuid = 27, #endregion #region XML Type /// /// Corresponds to the PostgreSQL "xml" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-xml.html Xml = 28, #endregion #region JSON Types /// /// Corresponds to the PostgreSQL "json" type, a field storing JSON in text format. /// /// See http://www.postgresql.org/docs/current/static/datatype-json.html /// Json = 35, /// /// Corresponds to the PostgreSQL "jsonb" type, a field storing JSON in an optimized binary /// format. /// /// /// Supported since PostgreSQL 9.4. /// See http://www.postgresql.org/docs/current/static/datatype-json.html /// Jsonb = 36, #endregion #region HSTORE Type /// /// Corresponds to the PostgreSQL "hstore" type, a dictionary of string key-value pairs. /// /// See http://www.postgresql.org/docs/current/static/hstore.html Hstore = 37, #endregion #region Arrays /// /// Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of /// another type. This value must be combined with another value from /// via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) /// /// See http://www.postgresql.org/docs/current/static/arrays.html Array = int.MinValue, #endregion #region Composite Types /// /// Corresponds to the PostgreSQL "composite" type. /// /// See http://www.postgresql.org/docs/current/static/rowtypes.html Composite = 48, #endregion #region Range Types /// /// Corresponds to the PostgreSQL "array" type, a variable-length multidimensional array of /// another type. This value must be combined with another value from /// via a bit OR (e.g. NpgsqlDbType.Array | NpgsqlDbType.Integer) /// /// /// Supported since PostgreSQL 9.2. /// See http://www.postgresql.org/docs/9.2/static/rangetypes.html /// Range = 0x40000000, #endregion #region Internal Types /// /// Corresponds to the PostgreSQL "refcursor" type. /// Refcursor = 23, /// /// Corresponds to the PostgreSQL internal "oidvector" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-oid.html Oidvector = 29, /// /// Corresponds to the PostgreSQL "oid" type. /// /// See http://www.postgresql.org/docs/current/static/datatype-oid.html Oid = 41, /// /// Corresponds to the PostgreSQL "xid" type, an internal transaction identifier. /// /// See http://www.postgresql.org/docs/current/static/datatype-oid.html Xid = 42, /// /// Corresponds to the PostgreSQL "cid" type, an internal command identifier. /// /// See http://www.postgresql.org/docs/current/static/datatype-oid.html Cid = 43, #endregion #region Special /// /// A special value that can be used to send parameter values to the database without /// specifying their type, allowing the database to cast them to another value based on context. /// The value will be converted to a string and send as text. /// /// /// This value shouldn't ordinarily be used, and makes sense only when sending a data type /// unsupported by Npgsql. /// Unknown = 40, #endregion } }
X Tutup