Examples of nullability()


Examples of com.foundationdb.server.types.TInstance.nullability()

                    @Override
                    public TInstance resultInstance(List<TPreptimeValue> inputs, TPreptimeContext context) {
                        TInstance inputType = inputs.get(0).type();
                        int binaryLength = inputType.attribute(TBinary.Attrs.LENGTH);
                        int base64Length = (binaryLength * 4 + 2) / 3; // round up for ='s
                        return varchar.instance(base64Length, inputType.nullability());
                    }       
                });
            }

            @Override
View Full Code Here

Examples of com.foundationdb.server.types.TInstance.nullability()

                    public TInstance resultInstance(List<TPreptimeValue> inputs, TPreptimeContext context) {
                        TInstance inputType = inputs.get(0).type();
                        int stringLength = inputType.attribute(StringAttribute.MAX_LENGTH);
                        int encodedLength = (int)Math.ceil(stringLength * Charset.forName(StringFactory.Charset.of(inputType.attribute(StringAttribute.CHARSET))).newEncoder().maxBytesPerChar());
                        int base64Length = (encodedLength * 4 + 2) / 3; // round up for ='s
                        return varchar.instance(base64Length, inputType.nullability());
                    }       
                });
            }

            @Override
View Full Code Here

Examples of com.foundationdb.server.types.TInstance.nullability()

                    @Override
                    public TInstance resultInstance(List<TPreptimeValue> inputs, TPreptimeContext context) {
                        TInstance inputType = inputs.get(0).type();
                        int stringLength = inputType.attribute(StringAttribute.MAX_LENGTH);
                        int binaryLength = stringLength / 4 * 3;
                        return varbinary.instance(binaryLength, inputType.nullability());
                    }       
                });
            }

            @Override
View Full Code Here

Examples of com.foundationdb.server.types.TInstance.nullability()

                    boolean eitherIsNullable;
                    if (botInstance == null)
                        eitherIsNullable = true;
                    else
                        eitherIsNullable = botInstance.nullability();
                    if ( (!eitherIsNullable) && (instances[field] != null)) {
                        // bottom is not nullable, and there is a top. See if it's nullable
                        eitherIsNullable = instances[field].nullability();
                    }
                   
View Full Code Here

Examples of com.foundationdb.server.types.TInstance.nullability()

            return boolExpr(expression, nullable);
        }

        private boolean isNullable(ExpressionNode node) {
            TInstance type = type(node);
            return type == null || type.nullability();
        }

        ExpressionNode handleColumnExpression(ColumnExpression expression) {
            Column column = expression.getColumn();
            ColumnSource columnSource = expression.getTable();
View Full Code Here

Examples of com.foundationdb.server.types.TInstance.nullability()

            Column column = expression.getColumn();
            ColumnSource columnSource = expression.getTable();
            if (column != null) {
                assert columnSource instanceof TableSource : columnSource;
                TInstance columnInstance = column.getType();
                if ((Boolean.FALSE == columnInstance.nullability()) &&
                    (expression.getSQLtype() != null) &&
                    (expression.getSQLtype().isNullable())) {
                    // With an outer join, the column can still be nullable.
                    columnInstance = columnInstance.withNullable(true);
                }
View Full Code Here

Examples of com.foundationdb.server.types.TInstance.nullability()

        TInstance type = column.getType();
        type = type.typeClass().instance(
                        type.attribute(StringAttribute.MAX_LENGTH),
                        StringFactory.Charset.LATIN1.ordinal(),
                        AkCollatorFactory.getAkCollator("en_us").getCollationId(),
                        type.nullability());
        column.setType(type);
        inAIS.freeze();
       
        final AkibanInformationSchema outAIS = writeAndRead(inAIS);
        compareAndAssert(inAIS, outAIS, false);
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.