- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.jooq.types.YearToMonth
类的一些代码示例,展示了YearToMonth
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YearToMonth
类的具体详情如下:
包路径:org.jooq.types.YearToMonth
类名称:YearToMonth
[英]An implementation for the SQL standard INTERVAL YEAR TO MONTH
data type.
YearToMonth
is a Number whose Number#intValue()represents the number of months of the interval.
Note: only a few databases actually support this data type on its own. You can still use it for date time arithmetic in other databases, though, through Field#add(Field) and Field#sub(Field) Databases that have been observed to natively support INTERVAL
data types are:
These dialects have been observed to partially support INTERVAL
data types in date time arithmetic functions, such as TIMESTAMPADD
, and TIMESTAMPDIFF
:
INTERVAL YEAR TO MONTH
数据类型的实现。YearToMonth
是一个数字,其数字#intValue()表示间隔的月数。INTERVAL
数据类型的字段#添加(字段)和字段#子(字段)数据库:INTERVAL
数据类型,例如TIMESTAMPADD
和[$5$]:代码示例来源:origin: org.jooq/jooq
@Override
public final YearToMonth abs() {
return new YearToMonth(years, months, false);
}
代码示例来源:origin: org.jooq/jooq
/**
* Convert a jOOQ <code>YEAR TO MONTH</code> interval to a Postgres representation
*/
public static Object toPGInterval(YearToMonth interval) {
return on("org.postgresql.util.PGInterval").create(
interval.getSign() * interval.getYears(),
interval.getSign() * interval.getMonths(),
0, 0, 0, 0.0).get();
}
代码示例来源:origin: org.jooq/jooq
@Override
public final long longValue() {
return intValue();
}
代码示例来源:origin: org.jooq/jooq
/**
* Convert a Postgres interval to a jOOQ <code>YEAR TO MONTH</code> interval
*/
public static YearToMonth toYearToMonth(Object pgInterval) {
boolean negative = pgInterval.toString().contains("-");
Reflect i = on(pgInterval);
if (negative) {
i.call("scale", -1);
}
YearToMonth result = new YearToMonth(
i.call("getYears").<Integer>get(),
i.call("getMonths").<Integer>get());
if (negative) {
result = result.neg();
}
return result;
}
代码示例来源:origin: org.jooq/jooq
@Override
final YearToMonth get0(BindingGetSQLInputContext<U> ctx) throws SQLException {
String string = ctx.input().readString();
return string == null ? null : YearToMonth.valueOf(string);
}
代码示例来源:origin: org.jooq/jooq
@Override
final void set0(BindingSetSQLOutputContext<U> ctx, YearToMonth value) throws SQLException {
ctx.output().writeString(value.toString());
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Convert a Postgres interval to a jOOQ <code>YEAR TO MONTH</code> interval
*/
public static YearToMonth toYearToMonth(Object pgInterval) {
boolean negative = pgInterval.toString().contains("-");
Reflect i = on(pgInterval);
if (negative) {
i.call("scale", -1);
}
YearToMonth result = new YearToMonth(
i.call("getYears").<Integer>get(),
i.call("getMonths").<Integer>get());
if (negative) {
result = result.neg();
}
return result;
}
代码示例来源:origin: org.jooq/jooq
private static final Interval parseIntervalLiteral(ParserContext ctx) {
String string = parseStringLiteral(ctx);
DayToSecond ds = DayToSecond.valueOf(string);
if (ds != null)
return ds;
YearToMonth ym = YearToMonth.valueOf(string);
if (ym != null)
return ym;
throw ctx.exception("Illegal interval literal");
}
代码示例来源:origin: org.jooq/jooq
@Override
final void set0(BindingSetStatementContext<U> ctx, YearToMonth value) throws SQLException {
// [#566] Interval data types are best bound as Strings
if (ctx.family() == POSTGRES)
ctx.statement().setObject(ctx.index(), toPGInterval(value));
else
ctx.statement().setString(ctx.index(), value.toString());
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/**
* Convert a jOOQ <code>YEAR TO MONTH</code> interval to a Postgres representation
*/
public static Object toPGInterval(YearToMonth interval) {
return on("org.postgresql.util.PGInterval").create(
interval.getSign() * interval.getYears(),
interval.getSign() * interval.getMonths(),
0, 0, 0, 0.0).get();
}
代码示例来源:origin: org.jooq/jooq
@Override
final YearToMonth get0(BindingGetStatementContext<U> ctx) throws SQLException {
if (ctx.family() == POSTGRES) {
Object object = ctx.statement().getObject(ctx.index());
return object == null ? null : PostgresUtils.toYearToMonth(object);
}
else {
String string = ctx.statement().getString(ctx.index());
return string == null ? null : YearToMonth.valueOf(string);
}
}
代码示例来源:origin: org.jooq/jooq
@Override
public final float floatValue() {
return intValue();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
@Override
public final YearToMonth neg() {
return new YearToMonth(years, months, !negative);
}
代码示例来源:origin: org.jooq/jooq
@Override
final YearToMonth get0(BindingGetResultSetContext<U> ctx) throws SQLException {
if (ctx.family() == POSTGRES) {
Object object = ctx.resultSet().getObject(ctx.index());
return object == null ? null : PostgresUtils.toYearToMonth(object);
}
else {
String string = ctx.resultSet().getString(ctx.index());
return string == null ? null : YearToMonth.valueOf(string);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
@Override
public final float floatValue() {
return intValue();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
@Override
public final YearToMonth abs() {
return new YearToMonth(years, months, false);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
return (T) (string == null ? null : YearToMonth.valueOf(string));
代码示例来源:origin: org.jooq/jooq
@Override
public final double doubleValue() {
return intValue();
}
代码示例来源:origin: org.jooq/jooq
@Override
public final YearToMonth neg() {
return new YearToMonth(years, months, !negative);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
return (T) (string == null ? null : YearToMonth.valueOf(string));
本文整理了Java中org.jooq.types.YearToMonth.neg()方法的一些代码示例,展示了YearToMonth.neg()的具体用法。这些代码示例主要来源于Github/Stac
本文整理了Java中org.jooq.types.YearToMonth.getSign()方法的一些代码示例,展示了YearToMonth.getSign()的具体用法。这些代码示例主要来源于Git
本文整理了Java中org.jooq.types.YearToMonth.getYears()方法的一些代码示例,展示了YearToMonth.getYears()的具体用法。这些代码示例主要来源于G
本文整理了Java中org.jooq.types.YearToMonth.valueOf()方法的一些代码示例,展示了YearToMonth.valueOf()的具体用法。这些代码示例主要来源于Git
本文整理了Java中org.jooq.types.YearToMonth.getMonths()方法的一些代码示例,展示了YearToMonth.getMonths()的具体用法。这些代码示例主要来源
本文整理了Java中org.jooq.types.YearToMonth.()方法的一些代码示例,展示了YearToMonth.()的具体用法。这些代码示例主要来源于Github/Stackoverf
我是一名优秀的程序员,十分优秀!