pike.git
/
lib
/
modules
/
Sql.pmod
/
mysql.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/lib/modules/Sql.pmod/mysql.pike:7:
//! This class encapsulates a connection to a MySQL server, and //! implements the glue needed to access the Mysql module from the //! generic SQL module. //! //! @section Typed mode //! //! When query results are returned in typed mode, the MySQL data //! types are represented like this: //! //! @dl
-
//! @item NULL
+
//! @item
The
NULL
value
//! Returned as @[Val.null]. //!
-
//! @item BIT
-
//!
@item
TINYINT
-
//!
@item
BOOL
-
//!
@item
SMALLINT
-
//!
@item
MEDIUMINT
-
//!
@item
INT
-
//!
@item
BIGINT
+
//! @item BIT
,
TINYINT
,
BOOL
,
SMALLINT
,
MEDIUMINT
,
INT
,
BIGINT
//! Returned as pike integers. //!
-
//! @item FLOAT
-
//!
@item
DOUBLE
+
//! @item FLOAT
,
DOUBLE
//! Returned as pike floats. //! //! @item DECIMAL //! Returned as pike integers for fields that are declared to //! contain zero decimals, otherwise returned as @[Gmp.mpq] objects. //!
-
//! @item DATE
-
//!
@item
DATETIME
-
//!
@item
TIME
-
//!
@item
YEAR
+
//! @item DATE
,
DATETIME
,
TIME
,
YEAR
//! Returned as strings in their display representation (see the //! MySQL manual). //! //! @[Calendar] objects are not used partly because they always //! represent a specific point or range in time, which these MySQL //! types do not. //! //! @item TIMESTAMP //! Also returned as strings in the display representation. //! //! The reason is that it's both more efficient and more robust (wrt //! time zone interpretations) to convert these to unix timestamps //! on the MySQL side rather than in the client glue. I.e. use the //! @tt{UNIX_TIMESTAMP@} function in the queries to retrieve them as //! unix timestamps on integer form. //!
-
//! @item
"
String types
"
+
//! @item String types
//! All string types are returned as pike strings. The MySQL glue //! can handle charset conversions for text strings - see //! @[set_charset] and @[set_unicode_decode_mode]. //! //! @enddl //! //! @endsection #pike __REAL_VERSION__