返回首页

gbase数据、南大通用产品文档:GBase8a_gbase_rep_fwd_tree_branch_num

更新日期:2024年09月11日

取值:[1,4]
默认值:2
说明:副本的前向树分支个数,取值范围[1,4],默认值为2。
修改方式:可在配置文件中修改值。适用于global 范围。

GBase8s 客户机产品能与所有符合 Windows Sockets 1.1 的 TCP/IP 协议一起使用。
要配置客户机产品实用程序,请通过 Setnet32 实用程序选择一个协议。有关指示信息,
请参阅设置数据库服务器信息。

com.gbasedbt.lang.IntervalYM 类允许您操纵年-月间隔。
IntervalYM 构造函数
缺省的构造函数定义如下:
public IntervalYM() throws SQLException
如果抛出异常,则请使用该构造函数的第二个版本来显示本地化的错误消息:
public IntervalYM(Connection conn) throws SQLException
请使用下列构造函数来从特定的输入值创建年-月间隔:

两个时间戳,返回等于 Timestamp1 - Timestamp2 的 IntervalYM 值:
public IntervalYM(Timestamp t1, Timestamp t2) throws
SQLException
public IntervalYM (Timestamp t1, Timestamp t2, Connectionconn) throws
SQLException
第二个版本允许您支持本地化的错误消息。

年和月值(将大型月份值转换为年):
public IntervalYM(int years, int months) throws
SQLException
public IntervalYM(int years, int months,
Connection conn) throws SQLException
第二个版本允许您支持本地化的错误消息。

月份值和编码的限定符:
public IntervalYM(int months, short qualifier, Connection conn) throws
SQLException
要指定限定符,可使用 Interval 方法 中描述的 getQualifier() 方法。此构造函数支持
本地化的错误消息。

字符串:
public IntervalYM(String string) throws SQLException
public IntervalYM(String string, Connection conn) throws

GBase 8s JDBC Driver 程序员指南
南大通用数据技术股份有限公司
- 113 -

SQLException
第二个版本允许您支持本地化的错误消息。

字符串和限定符:
public IntervalYM(String string, short qualifier, Connection conn) throws
SQLException
要指定限定符,可使用 Interval 方法 中描述的 getQualifier() 方法。此构造函数支持
本地化的错误消息。

字符和限定符信息:
public IntervalYM(String string, int length, byte startCode, byte endCode)
throws SQLException

public IntervalYM(String string, int length, byte startCode, byte endCode,
Connection conn) throws SQLException
第二个版本允许您支持本地化的错误消息。

IntervalYM 方法
下列方法允许您操纵年-月间隔。(您还可使用前面描述的 Interval 方法。)您可
以 IntervalYM 方法执行的某些任务包括下列:

比较两个间隔:
boolean equals(Object other)
boolean greaterThan(IntervalYM other)
boolean lessThan(IntervalYM other)

从其设置间隔的值:

字符串:
void fromString(String other)
void set(String string)

年和月值(将大型月值转换为年):
void set(int years, int months)

两个时间戳:
void set(Timestamp t1, Timestamp t2)

设置间隔的限定符:

从长度、开始代码和结束代码:
void setQualifier(int length, byte startcode, byte endcode)

使用现有的限定符:

GBase 8s JDBC Driver 程序员指南
南大通用数据技术股份有限公司
- 114 -

void setQualifier(short qualifier)

取得间隔中的月数:
long getMonths()

以 yyyy-mm 格式来创建间隔的字符串表示:
String toString()
字段的显示依赖于限定符。以空格替代开头的零。