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

boolean getX > isX

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