Package com.mysema.query.sql

Examples of com.mysema.query.sql.SQLServerTemplates


    public SQLServerQueryFactory(Configuration configuration, Provider<Connection> connection) {
        super(configuration, connection);
    }

    public SQLServerQueryFactory(Provider<Connection> connection) {
        this(new Configuration(new SQLServerTemplates()), connection);
    }
View Full Code Here


*
*/
public class SQLServerQuery extends AbstractSQLQuery<SQLServerQuery> {

    public SQLServerQuery(Connection conn) {
        this(conn, new SQLServerTemplates(), new DefaultQueryMetadata());
    }
View Full Code Here

        PathBuilder<String> funcAlias = new PathBuilder<String>(String.class, "tokFunc");
        SQLSubQuery sq = new SQLSubQuery();
        SubQueryExpression<?> expr = sq.from(table)
            .join(func, funcAlias).on(table.name.like(funcAlias.getString("prop")).not()).list(table.name);

        Configuration conf = new Configuration(new SQLServerTemplates());
        SQLSerializer serializer = new NativeSQLSerializer(conf, true);
        serializer.serialize(expr.getMetadata(), false);
        assertEquals("select SURVEY.NAME\n" +
                "from SURVEY SURVEY\n" +
                "join TableValuedFunction(?1) as tokFunc\n" +
View Full Code Here

    private static final QSurvey survey = QSurvey.survey;
   
    @Test
    public void TableHints_Single() {       
        SQLServerQuery query = new SQLServerQuery(null, new SQLServerTemplates());
        query.from(survey).tableHints(SQLServerTableHints.NOWAIT).where(survey.name.isNull());
        assertEquals("from SURVEY SURVEY with (NOWAIT)\nwhere SURVEY.NAME is null", query.toString());
    }
View Full Code Here

        assertEquals("from SURVEY SURVEY with (NOWAIT)\nwhere SURVEY.NAME is null", query.toString());
    }
   
    @Test
    public void TableHints_Multiple() {
        SQLServerQuery query = new SQLServerQuery(null, new SQLServerTemplates());
        query.from(survey).tableHints(SQLServerTableHints.NOWAIT, SQLServerTableHints.NOLOCK).where(survey.name.isNull());
        assertEquals("from SURVEY SURVEY with (NOWAIT, NOLOCK)\nwhere SURVEY.NAME is null", query.toString());
    }
View Full Code Here

    }
   
    @Test
    public void TableHints_Multiple2() {
        QSurvey survey2 = new QSurvey("survey2");
        SQLServerQuery query = new SQLServerQuery(null, new SQLServerTemplates());
        query.from(survey).tableHints(SQLServerTableHints.NOWAIT)
             .from(survey2).tableHints(SQLServerTableHints.NOLOCK)
             .where(survey.name.isNull());
        assertEquals("from SURVEY SURVEY with (NOWAIT), SURVEY survey2 with (NOLOCK)\nwhere SURVEY.NAME is null", query.toString());
    }
View Full Code Here

        switch (target.get()) {
        case CUBRID:return new CUBRIDTemplates();
        case DERBY: return new DerbyTemplates();
        case H2:    return new H2Templates();
        case HSQLDB:return new HSQLDBTemplates();
        case SQLSERVER: return new SQLServerTemplates();
        case MYSQL: return new MySQLTemplates();
        case ORACLE:return new OracleTemplates();
        case POSTGRES: return new PostgresTemplates();
        case SQLITE:return new SQLiteTemplates();
        case TERADATA: return new TeradataTemplates();
View Full Code Here

TOP

Related Classes of com.mysema.query.sql.SQLServerTemplates

Copyright © 2018 www.massapicom. 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.