mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
Revert UUID contextIds
This commit is contained in:
+5
-3
@@ -64,6 +64,8 @@ public class WebSQLProcessor {
|
||||
private final SQLRuleManager ruleManager;
|
||||
private final Map<String, WebSQLContextInfo> contexts = new LinkedHashMap<>();
|
||||
|
||||
private AtomicInteger contextId = new AtomicInteger();
|
||||
|
||||
WebSQLProcessor(@NotNull WebSession webSession, @NotNull WebConnectionInfo connection) {
|
||||
this.webSession = webSession;
|
||||
this.connection = connection;
|
||||
@@ -108,10 +110,10 @@ public class WebSQLProcessor {
|
||||
|
||||
@NotNull
|
||||
public WebSQLContextInfo createContext(String defaultCatalog, String defaultSchema) throws DBCException {
|
||||
UUID uuid = UUID.randomUUID();
|
||||
WebSQLContextInfo contextInfo = new WebSQLContextInfo(this, uuid.toString(), defaultCatalog, defaultSchema);
|
||||
String contextId = String.valueOf(this.contextId.incrementAndGet());
|
||||
WebSQLContextInfo contextInfo = new WebSQLContextInfo(this, contextId, defaultCatalog, defaultSchema);
|
||||
synchronized (contexts) {
|
||||
contexts.put(uuid.toString(), contextInfo);
|
||||
contexts.put(contextId, contextInfo);
|
||||
}
|
||||
return contextInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user