public interface DatatypeSystemOld
| Modifier and Type | Method and Description |
|---|---|
Object |
cast(Object value,
SqlDatatype target) |
Factory1<SqlExpr> |
cast(SqlDatatype from,
SqlDatatype to)
Return a factory for creating cast-expressions between the given datatypes
Null if no such cast exists.
|
Integer |
compare(SqlDatatype a,
SqlDatatype b)
Returns -1, 0, 1 if a is more specific, equal, more general the b.
|
SqlDatatype |
getByClass(Class<?> clazz) |
SqlDatatype |
getByName(String name) |
SqlDatatype |
mostGenericDatatype(SqlDatatype from,
SqlDatatype to)
Returns the top-most node of the tree of compatible datatypes
Hm, how to justify not returning object?
so integer and string -> numeric
string -> text
The rationale is, that all numeric types have similar semantics in regard
to comparison and arithmetic operations.
|
SqlDatatype |
requireByName(String name) |
Set<SqlDatatype> |
supremumDatatypes(SqlDatatype from,
SqlDatatype to) |
SqlDatatype getByName(String name)
SqlDatatype getByClass(Class<?> clazz)
SqlDatatype requireByName(String name)
Object cast(Object value, SqlDatatype target)
Factory1<SqlExpr> cast(SqlDatatype from, SqlDatatype to)
SqlDatatype mostGenericDatatype(SqlDatatype from, SqlDatatype to)
from - to - Set<SqlDatatype> supremumDatatypes(SqlDatatype from, SqlDatatype to)
Integer compare(SqlDatatype a, SqlDatatype b)
a - b - Copyright © 2014. All Rights Reserved.