📄 03-ct_split_sql.sgml
字号:
<!-- $Id: 03-ct_split_sql.sgml,v 1.1.1.1 2000/04/17 16:40:01 kk Exp $ --><sect1>CT_Split_Sql<p>The <tt/Session/ class used to contain a bit of SQL to read andwrite session data from and to a database. To make sessionsdatabase independent, <tt/Session/ now makes all storageaccesses through a container class. The<tt/CT_split_sql/ container is very similar to<tt/CT_Sql/ container, with the difference that ifserialized data exceeds a specified amount of bytes, multiplerows will be used to memorized the entire field.This class is NOT compatible with <tt/CT_Sql/ class, sincetable layout is different and column names are different in order toavoid reserved words in various database implementation. This uses a<tt/DB_Sql/ like class so you can access all supported databaseswith this container.<sect2>Instance variables<p><table><tabular ca="">database_table<colsep>The name of the database table which should be used<rowsep>database_class<colsep>A classname. CT_Sql uses this class to store and retrieve data<rowsep>split_length<colsep>A number. This specifies the maximum amount of bytes saved in each row of the table.</tabular><caption>Accessible instance variables.</caption></table><sect2>Example<p>Use a subclass to provide the appropriate parameters to your container. Usually your subclass looks like this: <tscreen><code>class My_Sql extends CT_Split_Sql { var $classname = "My_Sql"; var $database_table = "active_sessions_split"; var $database_class = "DB_Session"; var $split_length = 4096;}</code></tscreen>You can then use My_Sql in class Session. Reference itby putting "My_Sql" in the "that_class" variable.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -