提交 d57c80c0 authored 作者: Thomas Mueller's avatar Thomas Mueller

boolean getX > isX

上级 679b07b0
......@@ -535,7 +535,7 @@ public class LogFile {
DataPage buff = rowBuff;
buff.reset();
buff.writeInt(0);
if (record.getDeleted()) {
if (record.isDeleted()) {
buff.writeByte((byte) 'D');
} else {
buff.writeByte((byte) 'I');
......
......@@ -94,7 +94,7 @@ public class UndoLogRecord {
state = IN_MEMORY;
}
if (session.getDatabase().getLockMode() == Constants.LOCK_MODE_OFF) {
if (row.getDeleted()) {
if (row.isDeleted()) {
// it might have been deleted by another thread
return;
}
......
......@@ -91,7 +91,7 @@ public class Row extends Record implements SearchRow {
if (version != 0) {
buff.append(" v:" + version);
}
if (getDeleted()) {
if (isDeleted()) {
buff.append(" deleted");
}
buff.append(" */ ");
......
......@@ -57,7 +57,7 @@ public class RowList {
buff.writeInt(r.getColumnCount());
buff.writeInt(r.getPos());
buff.writeInt(r.getVersion());
buff.writeInt(r.getDeleted() ? 1 : 0);
buff.writeInt(r.isDeleted() ? 1 : 0);
buff.writeInt(r.getSessionId());
buff.writeInt(r.getStorageId());
for (int i = 0; i < r.getColumnCount(); i++) {
......
......@@ -339,7 +339,7 @@ public class Schema extends DbObjectBase {
*/
public String getUniqueConstraintName(Session session, Table table) {
HashMap<String, Constraint> tableConstraints;
if (table.getTemporary() && !table.getGlobalTemporary()) {
if (table.isTemporary() && !table.isGlobalTemporary()) {
tableConstraints = session.getLocalTempTableConstraints();
} else {
tableConstraints = constraints;
......@@ -357,7 +357,7 @@ public class Schema extends DbObjectBase {
*/
public String getUniqueIndexName(Session session, Table table, String prefix) {
HashMap<String, Index> tableIndexes;
if (table.getTemporary() && !table.getGlobalTemporary()) {
if (table.isTemporary() && !table.isGlobalTemporary()) {
tableIndexes = session.getLocalTempTableIndexes();
} else {
tableIndexes = indexes;
......@@ -486,17 +486,18 @@ public class Schema extends DbObjectBase {
* @param tableName the table name
* @param id the object id
* @param columns the column list
* @param persistIndexes if indexes of the table should be persistent
* @param persistData if data of the table should be persistent
* @param clustered if a clustered table should be created
* @param temporary whether this is a temporary table
* @param persistIndexes whether indexes of the table should be persistent
* @param persistData whether data of the table should be persistent
* @param clustered whether a clustered table should be created
* @param headPos the position (page number) of the head
* @param session the session
* @return the created {@link TableData} object
*/
public TableData createTable(String tableName, int id, ObjectArray<Column> columns, boolean persistIndexes, boolean persistData, boolean clustered, int headPos, Session session)
public TableData createTable(String tableName, int id, ObjectArray<Column> columns, boolean temporary, boolean persistIndexes, boolean persistData, boolean clustered, int headPos, Session session)
throws SQLException {
synchronized (database) {
return new TableData(this, tableName, id, columns, persistIndexes, persistData, clustered, headPos, session);
return new TableData(this, tableName, id, columns, temporary, persistIndexes, persistData, clustered, headPos, session);
}
}
......
......@@ -47,7 +47,7 @@ public class TriggerObject extends SchemaObjectBase {
public TriggerObject(Schema schema, int id, String name, Table table) {
initSchemaObjectBase(schema, id, name, Trace.TRIGGER);
this.table = table;
setTemporary(table.getTemporary());
setTemporary(table.isTemporary());
}
public void setBefore(boolean before) {
......@@ -222,7 +222,7 @@ public class TriggerObject extends SchemaObjectBase {
this.noWait = noWait;
}
public boolean getNoWait() {
public boolean isNoWait() {
return noWait;
}
......@@ -311,7 +311,7 @@ public class TriggerObject extends SchemaObjectBase {
*
* @return true if it is
*/
public boolean getBefore() {
public boolean isBefore() {
return before;
}
......
......@@ -79,7 +79,7 @@ public abstract class Record extends CacheObject {
this.sessionId = 0;
}
public boolean getDeleted() {
public boolean isDeleted() {
return deleted;
}
......
......@@ -199,7 +199,7 @@ public class Storage {
public void removeRecord(Session session, int pos) throws SQLException {
checkOnePage();
Record record = getRecord(session, pos);
if (SysProperties.CHECK && record.getDeleted()) {
if (SysProperties.CHECK && record.isDeleted()) {
Message.throwInternalError("duplicate delete " + pos);
}
record.setDeleted(true);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论