public static AbstractType<?> parse(String keyspace, String unparsed, Types userTypes) { String lowercased = unparsed.toLowerCase(); // fast path for the common case of a primitive type if (PRIMITIVE_TYPES.contains(lowercased)) return CQL3Type.Native.valueOf(unparsed.toUpperCase()).getType(); // special-case top-level UDTs UserType udt = userTypes.getNullable(bytes(lowercased)); if (udt != null) return udt; return parseRaw(unparsed).prepareInternal(keyspace, userTypes).getType(); }
for (CQL3Type type : CQL3Type.Native.values())
/** * private constructor. */ private static String getCollectionInnerType(Class<?> type) { CQL3Type.Native nativeType = MAP_JAVA_TYPE_TO_CQL_TYPE.get(type); return nativeType.name().toLowerCase(); }
for (CQL3Type type : CQL3Type.Native.values())
for (CQL3Type type : CQL3Type.Native.values())
public static Collection<Function> all() { Collection<Function> functions = new ArrayList<>(); // because text and varchar ends up being synonymous, our automatic makeToBlobFunction doesn't work // for varchar, so we special case it below. We also skip blob for obvious reasons. for (CQL3Type type : CQL3Type.Native.values()) { if (type != CQL3Type.Native.VARCHAR && type != CQL3Type.Native.BLOB) { functions.add(makeToBlobFunction(type.getType())); functions.add(makeFromBlobFunction(type.getType())); } } functions.add(VarcharAsBlobFct); functions.add(BlobAsVarcharFct); return functions; }
public static Collection<Function> all() { Collection<Function> functions = new ArrayList<>(); // because text and varchar ends up being synonymous, our automatic makeToBlobFunction doesn't work // for varchar, so we special case it below. We also skip blob for obvious reasons. for (CQL3Type type : CQL3Type.Native.values()) { if (type != CQL3Type.Native.VARCHAR && type != CQL3Type.Native.BLOB) { functions.add(makeToBlobFunction(type.getType())); functions.add(makeFromBlobFunction(type.getType())); } } functions.add(VarcharAsBlobFct); functions.add(BlobAsVarcharFct); return functions; }
public static Collection<Function> all() { Collection<Function> functions = new ArrayList<>(); // because text and varchar ends up being synonymous, our automatic makeToBlobFunction doesn't work // for varchar, so we special case it below. We also skip blob for obvious reasons. for (CQL3Type type : CQL3Type.Native.values()) { if (type != CQL3Type.Native.VARCHAR && type != CQL3Type.Native.BLOB) { functions.add(makeToBlobFunction(type.getType())); functions.add(makeFromBlobFunction(type.getType())); } } functions.add(VarcharAsBlobFct); functions.add(BlobAsVarcharFct); return functions; }
public static Collection<Function> all() { Collection<Function> functions = new ArrayList<>(); // because text and varchar ends up being synonymous, our automatic makeToBlobFunction doesn't work // for varchar, so we special case it below. We also skip blob for obvious reasons. for (CQL3Type type : CQL3Type.Native.values()) { if (type != CQL3Type.Native.VARCHAR && type != CQL3Type.Native.BLOB) { functions.add(makeToBlobFunction(type.getType())); functions.add(makeFromBlobFunction(type.getType())); } } functions.add(VarcharAsBlobFct); functions.add(BlobAsVarcharFct); return functions; }
public RowIndexSupport(String keyspace, IndexContainer indexContainer, Options options, TableMapper tableMapper) { this.options = options; this.tableMapper = tableMapper; this.keyspace = keyspace; this.indexContainer = indexContainer; tsFieldType = CassandraUtils.fieldType(Properties.ID_FIELD, CQL3Type.Native.BIGINT.getType()); }
public String toCQLLiteral(ByteBuffer buffer, ProtocolVersion version) { // *always* use the 'blob' syntax to express custom types in CQL return Native.BLOB.toCQLLiteral(buffer, version); }
public String toCQLLiteral(ByteBuffer buffer, ProtocolVersion version) { // *always* use the 'blob' syntax to express custom types in CQL return Native.BLOB.toCQLLiteral(buffer, version); }
public String toCQLLiteral(ByteBuffer buffer, ProtocolVersion version) { // *always* use the 'blob' syntax to express custom types in CQL return Native.BLOB.toCQLLiteral(buffer, version); }
public String toCQLLiteral(ByteBuffer buffer, ProtocolVersion version) { // *always* use the 'blob' syntax to express custom types in CQL return Native.BLOB.toCQLLiteral(buffer, version); }
public static AbstractType<?> parse(String keyspace, String unparsed, Types userTypes) { String lowercased = unparsed.toLowerCase(); // fast path for the common case of a primitive type if (PRIMITIVE_TYPES.contains(lowercased)) return CQL3Type.Native.valueOf(unparsed.toUpperCase()).getType(); // special-case top-level UDTs UserType udt = userTypes.getNullable(bytes(lowercased)); if (udt != null) return udt; return parseRaw(unparsed).prepareInternal(keyspace, userTypes).getType(); }
public static AbstractType<?> parse(KeyspaceMetadata ksm, String unparsed, Types userTypes) { String lowercased = unparsed.toLowerCase(); // fast path for the common case of a primitive type if (PRIMITIVE_TYPES.contains(lowercased)) return CQL3Type.Native.valueOf(unparsed.toUpperCase()).getType(); // special-case top-level UDTs UserType udt = userTypes.getNullable(bytes(lowercased)); if (udt != null) return udt; return parseRaw(unparsed).prepareInternal(ksm, userTypes).getType(); }
public static AbstractType<?> parse(String keyspace, String unparsed, Types userTypes) { String lowercased = unparsed.toLowerCase(); // fast path for the common case of a primitive type if (PRIMITIVE_TYPES.contains(lowercased)) return CQL3Type.Native.valueOf(unparsed.toUpperCase()).getType(); // special-case top-level UDTs UserType udt = userTypes.getNullable(bytes(lowercased)); if (udt != null) return udt; return parseRaw(unparsed).prepareInternal(keyspace, userTypes).getType(); }