public class SqlTypeAssignmentRules
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
SqlTypeAssignmentRules.Builder
Keeps state while maps are building build.
|
Modifier and Type | Field and Description |
---|---|
private static SqlTypeAssignmentRules |
COERCE_INSTANCE |
private static SqlTypeAssignmentRules |
INSTANCE |
private java.util.Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>> |
map |
Modifier | Constructor and Description |
---|---|
private |
SqlTypeAssignmentRules(java.util.Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>> map) |
Modifier and Type | Method and Description |
---|---|
boolean |
canCastFrom(SqlTypeName to,
SqlTypeName from)
Returns whether it is valid to cast a value of from type
from to
type to . |
boolean |
canCastFrom(SqlTypeName to,
SqlTypeName from,
boolean coerce)
Deprecated.
|
static SqlTypeAssignmentRules |
instance()
Returns an instance that does not coerce.
|
static SqlTypeAssignmentRules |
instance(boolean coerce)
Returns an instance.
|
private static final SqlTypeAssignmentRules INSTANCE
private static final SqlTypeAssignmentRules COERCE_INSTANCE
private final java.util.Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>> map
private SqlTypeAssignmentRules(java.util.Map<SqlTypeName,com.google.common.collect.ImmutableSet<SqlTypeName>> map)
public static SqlTypeAssignmentRules instance()
public static SqlTypeAssignmentRules instance(boolean coerce)
@Deprecated public boolean canCastFrom(SqlTypeName to, SqlTypeName from, boolean coerce)
public boolean canCastFrom(SqlTypeName to, SqlTypeName from)
from
to
type to
.Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.