Examples of SqlDialect


Examples of org.geotools.jdbc.SQLDialect

   
    protected void setUpDataStore(JDBCDataStore dataStore) {
        super.setUpDataStore(dataStore);
       
        // the unit tests needs function encoding enabled to actually test that
        SQLDialect dialect = dataStore.getSQLDialect();
        if (dialect instanceof DB2SQLDialectBasic)
            ((DB2SQLDialectBasic) dialect).setFunctionEncodingEnabled(true);
        if (dialect instanceof DB2SQLDialectPrepared)
            ((DB2SQLDialectPrepared) dialect).setFunctionEncodingEnabled(true);
    }
View Full Code Here

Examples of org.geotools.jdbc.SQLDialect

            throws IOException {
        String storageEngine = (String) STORAGE_ENGINE.lookUp( params );
        if (storageEngine == null) {
            storageEngine = (String) STORAGE_ENGINE.sample;
        }
        SQLDialect dialect = dataStore.getSQLDialect();
        if (dialect instanceof MySQLDialectBasic) {
            ((MySQLDialectBasic)dialect).setStorageEngine(storageEngine);
        }
        else {
            ((MySQLDialectPrepared)dialect).setStorageEngine(storageEngine);
View Full Code Here

Examples of org.jooq.SQLDialect

    }

    @Override
    protected DSLContext create0() {

        @SuppressWarnings("deprecation")
        SQLDialect dialect = SQLDialect.SQL99;

        try {
            dialect = SQLDialect.valueOf(getProperties().getProperty("dialect"));
        }
View Full Code Here

Examples of org.jooq.SQLDialect

        return result;
    }

    private Class<? extends Database> databaseClass(Jdbc j) {
        SQLDialect dialect = JDBCUtils.dialect(j.getUrl());
        Class<? extends Database> result = JDBCDatabase.class;

        switch (dialect.family()) {
            /* [pro] xx
            xxxx xxxxxxx    xxxxxx x xxxxxxxxxxxxxxxxxxx      xxxxxx
            xxxx xxxx       xxxxxx x xxxxxxxxxxxxxxxxxx       xxxxxx
            xxxx xxxx       xxxxxx x xxxxxxxxxxxxxxxxxx       xxxxxx
            xxxx xxxxxxxxx  xxxxxx x xxxxxxxxxxxxxxxxxxxxxxx  xxxxxx
View Full Code Here

Examples of org.jooq.SQLDialect

    }

    @Override
    public final void accept(Context<?> context) {
        if (context.declareFields() || context.declareTables()) {
            SQLDialect dialect = context.configuration().dialect();
            boolean simulateDerivedColumnList = false;

            // [#454] [#1801] Some databases don't allow "derived column names" in
            // "simple class specifications", or "common table expression references".
            // Hence, wrap the table reference in a subselect
            if (fieldAliases != null
                    && asList(CUBRID, FIREBIRD).contains(dialect.family())
                    && (wrapped instanceof TableImpl || wrapped instanceof CommonTableExpressionImpl)) {

                @SuppressWarnings("unchecked")
                Select<Record> select =
                    select(list(field("*"))).from(((Table<?>) wrapped).as(alias));

                context.sql("(").formatIndentStart().formatNewLine()
                       .visit(select).formatIndentEnd().formatNewLine()
                       .sql(")");
            }

            // [#1801] Some databases do not support "derived column names".
            // They can be simulated by concatenating a dummy SELECT with no
            // results using UNION ALL
            else if (fieldAliases != null && asList(H2, MARIADB, MYSQL, SQLITE).contains(dialect.family())) {
                simulateDerivedColumnList = true;

                SelectFieldList fields = new SelectFieldList();
                for (String fieldAlias : fieldAliases) {

                    switch (dialect.family()) {

                        /* [pro] xx
                        xxxx xxxxxxx x
                            xx xxxxxxxxxxx xx xxxxxx xxxxxxx xxxx xxxxx xxxxxxxxx xxxxx xx x xxxxxxx xxxxxxxxx
                            xx xx xxx xxxxx xxxxxxxxx xxxxxxx xx xxxxx
View Full Code Here

Examples of org.jooq.SQLDialect

    // XXX: QueryPart API
    // ------------------------------------------------------------------------

    @Override
    public final void accept(Context<?> ctx) {
        SQLDialect family = ctx.configuration().dialect().family();

        /* [pro] xx
        xx xxx xxxxxx xxxxxxx xxxxxx xxxxx xx xxxxx xxxxxxx xxxxxxx xxx xx xxx xxx x xxxxx xxxxxx xx xx xxxx
        xx xxxxxxx xx xxxxxxxxx xx xxxxxxxxxxxx xx xxxxx x
            xxxxxxxxxxxxxxxxxxxxxxxxxxx
View Full Code Here

Examples of org.jooq.SQLDialect

            accept0(ctx);
        }
    }

    private final void accept0(Context<?> ctx) {
        SQLDialect family = ctx.configuration().dialect().family();

        ctx.start(ALTER_TABLE_TABLE)
           .keyword("alter table").sql(" ").visit(table)
           .end(ALTER_TABLE_TABLE);
View Full Code Here

Examples of org.jooq.SQLDialect

            return unmodifiableList(asList(getPrimaryKey()));
        }

        @Override
        public final UniqueKey<Record> getPrimaryKey() {
            SQLDialect family = configuration.dialect().family();

            /* [pro] xx
            xx xxxxxxx xx xxxxxxx x
                xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
            x
View Full Code Here

Examples of org.jooq.SQLDialect

    private final QueryPartInternal delegate(Context<?> ctx) {
        final Configuration configuration = ctx.configuration();
        final RenderContext render = ctx instanceof RenderContext ? (RenderContext) ctx : null;

        SQLDialect family = configuration.dialect().family();

        // [#3505] TODO: Emulate this where it is not supported
        if (rightQuantified != null) {
            return new Native();
        }
View Full Code Here

Examples of org.jooq.SQLDialect

   */
  private static final long serialVersionUID = -2450323227461061152L;

  @Override
  public void exception(ExecuteContext ctx) {
    SQLDialect dialect = ctx.configuration().dialect();
    SQLExceptionTranslator translator = (dialect != null) ? new SQLErrorCodeSQLExceptionTranslator(dialect.name())
        : new SQLStateSQLExceptionTranslator();

    ctx.exception(translator.translate("jOOQ", ctx.sql(), ctx.sqlException()));
  }
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.