-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tobias Hafner
committed
Nov 20, 2024
1 parent
31e10c9
commit 245b405
Showing
4 changed files
with
304 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
235 changes: 235 additions & 0 deletions
235
dbms/src/test/java/org/polypheny/db/transaction/MockTransaction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,235 @@ | ||
/* | ||
* Copyright 2019-2024 The Polypheny Project | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.polypheny.db.transaction; | ||
|
||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.concurrent.atomic.AtomicBoolean; | ||
import org.jetbrains.annotations.Nullable; | ||
import org.polypheny.db.adapter.Adapter; | ||
import org.polypheny.db.adapter.java.JavaTypeFactory; | ||
import org.polypheny.db.catalog.entity.LogicalConstraint; | ||
import org.polypheny.db.catalog.entity.LogicalUser; | ||
import org.polypheny.db.catalog.entity.logical.LogicalNamespace; | ||
import org.polypheny.db.catalog.entity.logical.LogicalTable; | ||
import org.polypheny.db.catalog.snapshot.Snapshot; | ||
import org.polypheny.db.information.InformationManager; | ||
import org.polypheny.db.languages.QueryLanguage; | ||
import org.polypheny.db.processing.DataMigrator; | ||
import org.polypheny.db.processing.Processor; | ||
import org.polypheny.db.transaction.locking.Lockable; | ||
import org.polypheny.db.transaction.locking.Lockable.LockType; | ||
|
||
public class MockTransaction implements Transaction { | ||
private long id; | ||
|
||
public MockTransaction(long id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public long getId() { | ||
return id; | ||
} | ||
|
||
|
||
@Override | ||
public PolyXid getXid() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public Statement createStatement() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public LogicalUser getUser() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public void commit() throws TransactionException { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void rollback( @Nullable String reason ) throws TransactionException { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void registerInvolvedAdapter( Adapter<?> adapter ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public Set<Adapter<?>> getInvolvedAdapters() { | ||
return Set.of(); | ||
} | ||
|
||
|
||
@Override | ||
public Snapshot getSnapshot() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public boolean isActive() { | ||
return false; | ||
} | ||
|
||
|
||
@Override | ||
public JavaTypeFactory getTypeFactory() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public Processor getProcessor( QueryLanguage language ) { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public boolean isAnalyze() { | ||
return false; | ||
} | ||
|
||
|
||
@Override | ||
public void setAnalyze( boolean analyze ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public InformationManager getQueryAnalyzer() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public AtomicBoolean getCancelFlag() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public LogicalNamespace getDefaultNamespace() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public String getOrigin() { | ||
return ""; | ||
} | ||
|
||
|
||
@Override | ||
public MultimediaFlavor getFlavor() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public void wakeup() { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public long getNumberOfStatements() { | ||
return 0; | ||
} | ||
|
||
|
||
@Override | ||
public DataMigrator getDataMigrator() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public void setUseCache( boolean useCache ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public boolean getUseCache() { | ||
return false; | ||
} | ||
|
||
|
||
@Override | ||
public void addUsedTable( LogicalTable table ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void removeUsedTable( LogicalTable table ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void getNewEntityConstraints( long entity ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void addNewConstraint( long entityId, LogicalConstraint constraint ) { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public TransactionManager getTransactionManager() { | ||
return null; | ||
} | ||
|
||
|
||
@Override | ||
public List<LogicalConstraint> getUsedConstraints( long id ) { | ||
return List.of(); | ||
} | ||
|
||
|
||
@Override | ||
public void releaseAllLocks() { | ||
|
||
} | ||
|
||
|
||
@Override | ||
public void acquireLockable( Lockable lockable, LockType lockType ) { | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.