pike.git / lib / modules / Sql.pmod / mysql.pike

version» Context lines:

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 The NULL value + //! @item NULL   //! Returned as @[Val.null].   //! - //! @item BIT, TINYINT, BOOL, SMALLINT, MEDIUMINT, INT, BIGINT + //! @item BIT + //! @item TINYINT + //! @item BOOL + //! @item SMALLINT + //! @item MEDIUMINT + //! @item INT + //! @item BIGINT   //! Returned as pike integers.   //! - //! @item FLOAT, DOUBLE + //! @item FLOAT + //! @item 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, DATETIME, TIME, YEAR + //! @item DATE + //! @item DATETIME + //! @item TIME + //! @item 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   //! - //! @section + //! @endsection      #pike __REAL_VERSION__      // Cannot dump this since the #if constant(...) check below may depend   // on the presence of system libs at runtime.   constant dont_dump_program = 1;      #if constant(Mysql.mysql)      inherit Mysql.mysql;