SQLServer2005Dialect: Moved the small methods on top of the class

This commit is contained in:
Yoryos Valotasios 2010-11-23 00:25:14 +02:00
parent 48239bbbcc
commit f6a349bcb8
1 changed files with 25 additions and 25 deletions

View File

@ -57,6 +57,31 @@ public class SQLServer2005Dialect extends SQLServerDialect {
registerFunction("row_number", new NoArgSQLFunction("row_number", StandardBasicTypes.INTEGER, true)); registerFunction("row_number", new NoArgSQLFunction("row_number", StandardBasicTypes.INTEGER, true));
} }
@Override
public boolean supportsLimit() {
return true;
}
@Override
public boolean useMaxForLimit() {
return true;
}
@Override
public boolean supportsLimitOffset() {
return true;
}
@Override
public boolean bindLimitParametersFirst() {
return false;
}
@Override
public boolean supportsVariableLimit() {
return true;
}
@Override @Override
public int convertToFirstRowValue(int zeroBasedFirstResult) { public int convertToFirstRowValue(int zeroBasedFirstResult) {
// Our dialect isn't zero based. The first row should get the number 1 // Our dialect isn't zero based. The first row should get the number 1
@ -176,29 +201,4 @@ public class SQLServer2005Dialect extends SQLServerDialect {
// Isert after the select statement the row_number() function: // Isert after the select statement the row_number() function:
sql.insert(selectEndIndex, " ROW_NUMBER() OVER (" + orderby + ") as __hibernate_row_nr__,"); sql.insert(selectEndIndex, " ROW_NUMBER() OVER (" + orderby + ") as __hibernate_row_nr__,");
} }
@Override
public boolean supportsLimit() {
return true;
}
@Override
public boolean useMaxForLimit() {
return true;
}
@Override
public boolean supportsLimitOffset() {
return true;
}
@Override
public boolean bindLimitParametersFirst() {
return false;
}
@Override
public boolean supportsVariableLimit() {
return true;
}
} }