Examples of newBoolean()


Examples of org.jruby.Ruby.newBoolean()

                            IRubyObject indexDefinition = indexDefinitionClass.callMethod(context, "new",
                                    new IRubyObject[] {
                                RubyString.newUnicodeString(runtime, tableName),
                                RubyString.newUnicodeString(runtime, indexName),
                                runtime.newBoolean(!nonUnique),
                                runtime.newArray()
                            });

                            // empty list for column names, we'll add to that in just a bit
                            indexes.add(indexDefinition);
View Full Code Here

Examples of org.jruby.Ruby.newBoolean()

                            getInstanceVariable("@config"),
                            RubyString.newUnicodeString(runtime,
                                    caseConvertIdentifierForRails(metadata, colName)),
                            defaultValueFromResultSet(runtime, rs),
                            RubyString.newUnicodeString(runtime, typeFromResultSet(rs, isOracle)),
                            runtime.newBoolean(!rs.getString(IS_NULLABLE).trim().equals("NO"))
                        });
                columns.add(column);

                IRubyObject tp = (IRubyObject)types.fastARef(column.callMethod(context,"type"));
                if (tp != null && !tp.isNil() && tp.callMethod(context, "[]", runtime.newSymbol("limit")).isNil()) {
View Full Code Here

Examples of org.jruby.Ruby.newBoolean()

                    standard_conforming_strings = executeQueryImpl(context, self,
                        "SHOW standard_conforming_strings", 1, false, new WithResultSet<IRubyObject>() {
                        public IRubyObject call(final ResultSet resultSet) throws SQLException {
                            if ( resultSet != null && resultSet.next() ) {
                                final String result = resultSet.getString(1);
                                return runtime.newBoolean( "on".equals(result) );
                            }
                            return context.nil;
                        }
                    });
                }
View Full Code Here

Examples of org.jruby.Ruby.newBoolean()

            else value = "on";
            // NOTE: we no longer log this query as before ... with :
            // execute("SET standard_conforming_strings = #{value}", 'SCHEMA')
            executeImpl(context, self, "SET standard_conforming_strings = " + value);

            standard_conforming_strings = runtime.newBoolean( value == (Object) "on" );
        }
        catch (RaiseException e) {
            // unsupported
        }
        finally {
View Full Code Here

Examples of org.jruby.Ruby.newBoolean()

                            final boolean nonUnique = keySet.getBoolean("non_unique");

                            IRubyObject[] args = new IRubyObject[] {
                                rubyTableName, // table_name
                                RubyString.newUnicodeString(runtime, keyName), // index_name
                                runtime.newBoolean( ! nonUnique ), // unique
                                runtime.newArray(), // [] for column names, we'll add to that in just a bit
                                runtime.newArray() // lengths
                            };

                            indexes.append( indexDefinition.callMethod(context, "new", args) ); // IndexDefinition.new
View Full Code Here

Examples of org.jruby.Ruby.newBoolean()

        final String defaultSchema, final String tableName) {
        final Ruby runtime = context.runtime;
        return withConnection(context, new Callable<RubyBoolean>() {
            public RubyBoolean call(final Connection connection) throws SQLException {
                final TableName components = extractTableName(connection, defaultSchema, tableName);
                return runtime.newBoolean( tableExists(runtime, connection, components) );
            }
        });
    }

    @JRubyMethod(name = {"columns", "columns_internal"}, required = 1, optional = 2)
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newBoolean()

  }

  @Test
  public void testBooleanWithOneClause() throws QueryNodeException {
    final QueryBuilder build = new QueryBuilder();
    final BooleanQuery bool = build.newBoolean()
                                   .with(build.newNode("aaa"));
    assertParser(bool);
  }

  @Test
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newBoolean()

  }

  @Test
  public void testBooleanWithMultipleClauses() throws QueryNodeException {
    final QueryBuilder build = new QueryBuilder();
    final BooleanQuery bool = build.newBoolean()
                                   .with(build.newNode("aaa"))
                                   .without(build.newNode("bbb"))
                                   .optional(build.newTwig("ccc").with(build.newNode("ddd")));
    assertParser(bool);
  }
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newBoolean()

    final String[] queries = {
      b.newNode("Cambridge").toString(),
      b.newTwig("placeOfPublication").with(b.newNode("Cambridge")).toString(),
      b.newTwig("publisher").with(b.newNode("Cambridge Scholars")).toString(),
      b.newTwig("subject").with(b.newNode("Environmental")).toString(),
      b.newBoolean().with(b.newTwig("subject").with(b.newNode("Environmental")))
                    .with(b.newTwig("issued").with(b.newNode("2009"))).toString(),
      b.newTwig("type").with(b.newNode("text"))
                       .with(b.newNode("monographic")).toString(),
      b.newTwig("identifier").with(
        // here, twig with empty root node to represent first nested entity node
View Full Code Here

Examples of org.sindice.siren.qparser.json.dsl.QueryBuilder.newBoolean()

      b.newTwig("identifier").with(
        // here, twig with empty root node to represent first nested entity node
        b.newTwig().with(b.newTwig("id").with(b.newNode("9780852935392")))
                   .with(b.newTwig("type").with(b.newNode("isbn")))
      ).toString(),
      b.newBoolean().with(b.newTwig("subject").with(b.newNode("Computer security")))
                    .with(b.newTwig("isPartOf").with(
                      // here, twig with empty root node to represent first nested entity node
                      b.newTwig().with(
                        b.newTwig("identifier").with(
                          // here, twig with empty root node to represent second nested entity node
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.