org.postgresql.core.CallableQueryKey Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdbc-yugabytedb Show documentation
Show all versions of jdbc-yugabytedb Show documentation
Java JDBC 4.2 (JRE 8+) driver for YugaByte SQL database
The newest version!
/*
* Copyright (c) 2015, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.core;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* Serves as a cache key for {@link java.sql.CallableStatement}.
* Callable statements require some special parsing before use (due to JDBC {@code {?= call...}}
* syntax, thus a special cache key class is used to trigger proper parsing for callable statements.
*/
class CallableQueryKey extends BaseQueryKey {
CallableQueryKey(String sql) {
super(sql, true, true);
}
@Override
public String toString() {
return "CallableQueryKey{"
+ "sql='" + sql + '\''
+ ", isParameterized=" + isParameterized
+ ", escapeProcessing=" + escapeProcessing
+ '}';
}
@Override
public int hashCode() {
return super.hashCode() * 31;
}
@Override
public boolean equals(@Nullable Object o) {
// Nothing interesting here, overriding equals to make hashCode and equals paired
return super.equals(o);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy