mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-12 22:41:35 +00:00
#2113 - Refactor rename Query.ForUpdate to Query.LockWait
Slightly improve the name of the enum. Note that although this is on public Query it's only internally used.
This commit is contained in:
1 parent
8e91268979
commit
9064e96b90
14 files changed
+57
-54
No files matched your search
@@ -30,24 +30,24 @@ public class PostgresPlatformTest {
|
||||
platform.configure(config);
|
||||
|
||||
assertThat(config.isForUpdateNoKey()).isFalse();
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.SKIPLOCKED, Query.LockType.Default)).isEqualTo("X for update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.NOWAIT, Query.LockType.Default)).isEqualTo("X for update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.BASE, Query.LockType.Default)).isEqualTo("X for update");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.Default)).isEqualTo("X for update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.Default)).isEqualTo("X for update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.Default)).isEqualTo("X for update");
|
||||
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.SKIPLOCKED, Query.LockType.Update)).isEqualTo("X for update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.SKIPLOCKED, Query.LockType.NoKeyUpdate)).isEqualTo("X for no key update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.SKIPLOCKED, Query.LockType.Share)).isEqualTo("X for share skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.SKIPLOCKED, Query.LockType.KeyShare)).isEqualTo("X for key share skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.Update)).isEqualTo("X for update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.NoKeyUpdate)).isEqualTo("X for no key update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.Share)).isEqualTo("X for share skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.KeyShare)).isEqualTo("X for key share skip locked");
|
||||
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.NOWAIT, Query.LockType.Update)).isEqualTo("X for update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.NOWAIT, Query.LockType.NoKeyUpdate)).isEqualTo("X for no key update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.NOWAIT, Query.LockType.Share)).isEqualTo("X for share nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.NOWAIT, Query.LockType.KeyShare)).isEqualTo("X for key share nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.Update)).isEqualTo("X for update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.NoKeyUpdate)).isEqualTo("X for no key update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.Share)).isEqualTo("X for share nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.KeyShare)).isEqualTo("X for key share nowait");
|
||||
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.BASE, Query.LockType.Update)).isEqualTo("X for update");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.BASE, Query.LockType.NoKeyUpdate)).isEqualTo("X for no key update");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.BASE, Query.LockType.Share)).isEqualTo("X for share");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.BASE, Query.LockType.KeyShare)).isEqualTo("X for key share");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.Update)).isEqualTo("X for update");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.NoKeyUpdate)).isEqualTo("X for no key update");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.Share)).isEqualTo("X for share");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.KeyShare)).isEqualTo("X for key share");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -60,9 +60,9 @@ public class PostgresPlatformTest {
|
||||
platform.configure(config);
|
||||
|
||||
assertThat(config.isForUpdateNoKey()).isTrue();
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.SKIPLOCKED, Query.LockType.Default)).isEqualTo("X for no key update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.NOWAIT, Query.LockType.Default)).isEqualTo("X for no key update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.ForUpdate.BASE, Query.LockType.Default)).isEqualTo("X for no key update");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.SKIPLOCKED, Query.LockType.Default)).isEqualTo("X for no key update skip locked");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.NOWAIT, Query.LockType.Default)).isEqualTo("X for no key update nowait");
|
||||
assertThat(platform.withForUpdate("X", Query.LockWait.WAIT, Query.LockType.Default)).isEqualTo("X for no key update");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user