MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / DummyDatabase

Class DummyDatabase

Utils/src/eu/the5zig/util/db/DummyDatabase.java:7–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5import java.sql.Connection;
6
7public class DummyDatabase extends Database {
8
9 public DummyDatabase() throws NoConnectionException {
10 super(null);
11 }
12
13 @Override
14 protected synchronized Connection openConnection() {
15 connected = true;
16 return null;
17 }
18
19 @Override
20 public <T> SQLQuery<T> get(Class<T> entity) {
21 return new DummySQLQuery<T>(this, entity);
22 }
23
24 @Override
25 public int doUpdate(String query, Object... fields) {
26 return 0;
27 }
28
29 @Override
30 protected int doUpdateWithGeneratedKeys(String query, Object... fields) {
31 return 0;
32 }
33
34 @Override
35 public synchronized Connection getConnection() throws NoConnectionException {
36 return null;
37 }
38
39 @Override
40 public synchronized boolean hasConnection() {
41 return true;
42 }
43
44 @Override
45 public synchronized void closeConnection() {
46 }
47}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected