Examples of valueType()


Examples of io.crate.planner.symbol.DataTypeSymbol.valueType()

        for (int i = 0; i < analysis.columns().size(); i++) {
            assertThat(analysis.getSubQueryColumns().get(i), instanceOf(DataTypeSymbol.class));
            DataTypeSymbol subQueryColumn = (DataTypeSymbol)analysis.getSubQueryColumns().get(i);
            Reference insertColumn = analysis.columns().get(i);
            assertThat(
                    subQueryColumn.valueType().isConvertableTo(insertColumn.valueType()),
                    is(true)
            );
        }

    }
View Full Code Here

Examples of io.crate.planner.symbol.DynamicReference.valueType()

        ReferenceInfo foobar = info.getReferenceInfo(new ColumnIdent("o", ImmutableList.of("foobar")));
        assertNull(foobar);
        DynamicReference reference = info.getDynamic(new ColumnIdent("o", ImmutableList.of("foobar")));
        assertNotNull(reference);
        assertSame(reference.valueType(), DataTypes.UNDEFINED);
    }

    @Test
    public void testGetColumnInfoStrictParent() throws Exception {
View Full Code Here

Examples of io.crate.planner.symbol.Literal.valueType()

        if (!left.symbolType().isValueSymbol()) {
            return function;
        }
        Object inValue = ((Literal) left).value();
        Literal inList = (Literal) function.arguments().get(1);
        assert inList.valueType().id() == SetType.ID;
        Set values = (Set)inList.value();

        if (!values.contains(inValue)) {
            return Literal.newLiteral(false);
        }
View Full Code Here

Examples of io.crate.planner.symbol.Reference.valueType()

        for (int i = 0; i < analysis.columns().size(); i++) {
            assertThat(analysis.getSubQueryColumns().get(i), instanceOf(DataTypeSymbol.class));
            DataTypeSymbol subQueryColumn = (DataTypeSymbol)analysis.getSubQueryColumns().get(i);
            Reference insertColumn = analysis.columns().get(i);
            assertThat(
                    subQueryColumn.valueType().isConvertableTo(insertColumn.valueType()),
                    is(true)
            );
        }

    }
View Full Code Here

Examples of io.crate.planner.symbol.Value.valueType()

        BytesStreamOutput out = new BytesStreamOutput();
        Symbol.toStream(v, out);

        BytesStreamInput in = new BytesStreamInput(out.bytes());
        Value v2 = (Value) Symbol.fromStream(in);
        assertEquals(v2.valueType(), DataTypes.STRING);
    }
}
View Full Code Here

Examples of ns.foundation.NSKeyValueCoding._KeyBinding.valueType()

  public void testDefaultImplementation$_keyGetBindingForKey$stringMethod() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "stringMethod");
    assertEquals(String.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.stringField = FORTY_TWO_STRING;
    assertEquals(FORTY_TWO_STRING, kb.valueInObject(obj));
  }
 
View Full Code Here

Examples of ns.foundation.NSKeyValueCoding._KeyBinding.valueType()

   */
  public void testDefaultImplementation$_keySetBindingForKey$byteMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "byteObjectMethod");
    assertEquals(Byte.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_BYTE, obj);
    assertEquals(FORTY_TWO_BYTE, obj.byteObjectField);

View Full Code Here

Examples of ns.foundation.NSKeyValueCoding._KeyBinding.valueType()

    kb.setValueInObject(FORTY_TWO_BYTE, obj);
    assertEquals(FORTY_TWO_BYTE, obj.byteObjectField);

    kb = DefaultImplementation._keySetBindingForKey(obj, "byteMethod");
    assertEquals(Byte.TYPE, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_BYTE, obj);
    assertEquals(FORTY_TWO_BYTE.byteValue(), obj.byteField);
  }
View Full Code Here

Examples of ns.foundation.NSKeyValueCoding._KeyBinding.valueType()

  public void testDefaultImplementation$_keySetBindingForKey$charMethod() {
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keySetBindingForKey(obj, "charObjectMethod");
    assertEquals(Character.class, kb.valueType());
    assertFalse(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_CHAR, obj);
    assertEquals(FORTY_TWO_CHAR, obj.charObjectField);
View Full Code Here

Examples of ns.foundation.NSKeyValueCoding._KeyBinding.valueType()

    kb.setValueInObject(FORTY_TWO_CHAR, obj);
    assertEquals(FORTY_TWO_CHAR, obj.charObjectField);

    kb = DefaultImplementation._keySetBindingForKey(obj, "charMethod");
    assertEquals(Character.TYPE, kb.valueType());
    assertTrue(kb.isScalarProperty());

    kb.setValueInObject(FORTY_TWO_CHAR, obj);
    assertEquals(FORTY_TWO_CHAR.charValue(), obj.charField);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.