Add exception handling and database changes
New exception handlers have been added and database setup files introduced. This update also deletes unnecessary Docker and Java files, and modifies various files related to error handling and database changes. Exception handlers for runtime, social network, and not found exceptions are added to improve error feedback in the application. Database setup includes a Liquibase changelog and SQL scripts to create the person table in the database.
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
*
|
*
|
||||||
!target/*-runner
|
!network-backend
|
||||||
!target/*-runner.jar
|
!network-context
|
||||||
!target/lib/*
|
!network-controller-rest
|
||||||
!target/quarkus-app/*
|
!network-core
|
||||||
|
!network-data-jooq
|
||||||
|
!network-data-panache
|
||||||
|
!network-domain
|
||||||
|
!network-exception
|
||||||
|
!network-schema-rest
|
||||||
|
!mvnw
|
||||||
|
!.mvn
|
||||||
|
!pom.xml
|
||||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -76,3 +76,12 @@ Network Trash Folder
|
|||||||
Temporary Items
|
Temporary Items
|
||||||
.apdisk
|
.apdisk
|
||||||
/social-network.iml
|
/social-network.iml
|
||||||
|
/network-backend.iml
|
||||||
|
/network-context.iml
|
||||||
|
/network-controller-rest.iml
|
||||||
|
/network-core.iml
|
||||||
|
/network-data-jooq.iml
|
||||||
|
/network-data-panache.iml
|
||||||
|
/network-domain.iml
|
||||||
|
/network-schema-rest.iml
|
||||||
|
/network-exception.iml
|
||||||
|
|||||||
48
Dockerfile
Normal file
48
Dockerfile
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
FROM eclipse-temurin:21 as app-build
|
||||||
|
ENV RELEASE=21
|
||||||
|
|
||||||
|
WORKDIR /opt/build
|
||||||
|
COPY .mvn .
|
||||||
|
COPY pom.xml .
|
||||||
|
COPY network-backend/pom.xml ./network-backend/pom.xml
|
||||||
|
COPY network-context/pom.xml ./network-context/pom.xml
|
||||||
|
COPY network-controller-rest/pom.xml ./network-controller-rest/pom.xml
|
||||||
|
COPY network-core/pom.xml ./network-core/pom.xml
|
||||||
|
COPY network-data-jooq/pom.xml ./network-data-jooq/pom.xml
|
||||||
|
COPY network-data-panache/pom.xml ./network-data-panache/pom.xml
|
||||||
|
COPY network-domain/pom.xml ./network-domain/pom.xml
|
||||||
|
COPY network-exception/pom.xml ./network-exception/pom.xml
|
||||||
|
COPY network-schema-rest/pom.xml ./network-schema-rest/pom.xml
|
||||||
|
COPY . .
|
||||||
|
RUN ./mvnw -T 1C dependency:go-offline
|
||||||
|
RUN ./mvnw -T 1C -Dquarkus.package.type=uber-jar clean package && mv network-backend/target/ ./uber-jar && ./mvnw -T 1C clean package && mv network-backend/target/quarkus-app/* . && mv network-backend/target/*.jar .
|
||||||
|
RUN $JAVA_HOME/bin/jlink \
|
||||||
|
--add-modules `jdeps --ignore-missing-deps -q -recursive --multi-release ${RELEASE} --print-module-deps --class-path 'lib/boot/*:lib/main/*:quarkus/*:app/*:*.jar' uber-jar/*.jar`,jdk.zipfs,jdk.crypto.cryptoki \
|
||||||
|
--strip-java-debug-attributes \
|
||||||
|
--no-man-pages \
|
||||||
|
--no-header-files \
|
||||||
|
--compress=2 \
|
||||||
|
--output jdk
|
||||||
|
RUN rm -rf /opt/build/.mvn /opt/build/*.xml /opt/build/network-*/ /opt/build/uber-jar
|
||||||
|
|
||||||
|
FROM debian:buster-slim
|
||||||
|
|
||||||
|
ARG BUILD_PATH=/opt/build
|
||||||
|
ENV JAVA_HOME=/quarkus-app/jdk
|
||||||
|
ENV PATH "${JAVA_HOME}/bin:${PATH}"
|
||||||
|
|
||||||
|
RUN groupadd --gid 1000 quarkus-app && useradd --uid 1000 --gid quarkus-app --shell /bin/bash --create-home quarkus-app
|
||||||
|
USER quarkus-app:quarkus-app
|
||||||
|
|
||||||
|
WORKDIR /quarkus-app
|
||||||
|
|
||||||
|
COPY --from=app-build --chown=quarkus-app:quarkus-app $BUILD_PATH/jdk/ ./jdk/
|
||||||
|
COPY --from=app-build --chown=quarkus-app:quarkus-app $BUILD_PATH/lib/ ./lib/
|
||||||
|
COPY --from=app-build --chown=quarkus-app:quarkus-app $BUILD_PATH/*.jar ./
|
||||||
|
COPY --from=app-build --chown=quarkus-app:quarkus-app $BUILD_PATH/app/ ./app/
|
||||||
|
COPY --from=app-build --chown=quarkus-app:quarkus-app $BUILD_PATH/quarkus/ ./quarkus/
|
||||||
|
|
||||||
|
EXPOSE 8080 8090
|
||||||
|
|
||||||
|
ENTRYPOINT ["java", "-jar", "-Dfile.encoding=UTF8", "-Dconsole.encoding=UTF8", "-Dorg.jooq.no-tips=true", "-Dorg.jooq.no-logo=true", "/quarkus-app/quarkus-run.jar"]
|
||||||
|
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
####
|
####
|
||||||
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
|
# This Dockerfile.native is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
|
||||||
# It uses a micro base image, tuned for Quarkus native executables.
|
# It uses a micro base image, tuned for Quarkus native executables.
|
||||||
# It reduces the size of the resulting container image.
|
# It reduces the size of the resulting container image.
|
||||||
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
|
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
|
||||||
#
|
#
|
||||||
# Before building the container image run:
|
# Before building the container image run:
|
||||||
#
|
#
|
||||||
# ./mvnw package -Dnative
|
# ./mvnw package -Dnative -Dquarkus.native.remote-container-build=true
|
||||||
#
|
#
|
||||||
# Then, build the image with:
|
# Then, build the image with:
|
||||||
#
|
#
|
||||||
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/social-network .
|
# docker build -t quarkus/social-network:latest .
|
||||||
#
|
#
|
||||||
# Then run the container using:
|
# Then run the container using:
|
||||||
#
|
#
|
||||||
# docker run -i --rm -p 8080:8080 quarkus/social-network
|
# docker run -i --rm -p 8080:8080 quarkus/social-network:latest
|
||||||
#
|
#
|
||||||
###
|
###
|
||||||
FROM quay.io/quarkus/quarkus-micro-image:2.0
|
FROM quay.io/quarkus/quarkus-micro-image:2.0
|
||||||
70
README.md
70
README.md
@@ -1,68 +1,8 @@
|
|||||||
# social-network
|
# MySpace
|
||||||
|
|
||||||
This project uses Quarkus, the Supersonic Subatomic Java Framework.
|
## Запуск
|
||||||
|
```
|
||||||
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
|
docker compose up --build
|
||||||
|
|
||||||
## Running the application in dev mode
|
|
||||||
|
|
||||||
You can run your application in dev mode that enables live coding using:
|
|
||||||
|
|
||||||
```shell script
|
|
||||||
./mvnw compile quarkus:dev
|
|
||||||
```
|
```
|
||||||
|
|
||||||
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
|
Postman коллекция находится в папке `postman`.
|
||||||
|
|
||||||
## Packaging and running the application
|
|
||||||
|
|
||||||
The application can be packaged using:
|
|
||||||
|
|
||||||
```shell script
|
|
||||||
./mvnw package
|
|
||||||
```
|
|
||||||
|
|
||||||
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
|
|
||||||
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
|
|
||||||
|
|
||||||
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
|
|
||||||
|
|
||||||
If you want to build an _über-jar_, execute the following command:
|
|
||||||
|
|
||||||
```shell script
|
|
||||||
./mvnw package -Dquarkus.package.type=uber-jar
|
|
||||||
```
|
|
||||||
|
|
||||||
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
|
|
||||||
|
|
||||||
## Creating a native executable
|
|
||||||
|
|
||||||
You can create a native executable using:
|
|
||||||
|
|
||||||
```shell script
|
|
||||||
./mvnw package -Dnative
|
|
||||||
```
|
|
||||||
|
|
||||||
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
|
|
||||||
|
|
||||||
```shell script
|
|
||||||
./mvnw package -Dnative -Dquarkus.native.container-build=true
|
|
||||||
```
|
|
||||||
|
|
||||||
You can then execute your native executable with: `./target/social-network-1.0-SNAPSHOT-runner`
|
|
||||||
|
|
||||||
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.
|
|
||||||
|
|
||||||
## Related Guides
|
|
||||||
|
|
||||||
- Hibernate Validator ([guide](https://quarkus.io/guides/validation)): Validate object properties (field, getter) and method parameters for your beans (REST, CDI, Jakarta Persistence)
|
|
||||||
- Reactive PostgreSQL client ([guide](https://quarkus.io/guides/reactive-sql-clients)): Connect to the PostgreSQL database using the reactive pattern
|
|
||||||
- Micrometer metrics ([guide](https://quarkus.io/guides/micrometer)): Instrument the runtime and your application with dimensional metrics using Micrometer.
|
|
||||||
|
|
||||||
## Provided Code
|
|
||||||
|
|
||||||
### RESTEasy Reactive
|
|
||||||
|
|
||||||
Easily start your Reactive RESTful Web Services
|
|
||||||
|
|
||||||
[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources)
|
|
||||||
39
docker-compose.yml
Normal file
39
docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
services:
|
||||||
|
|
||||||
|
myspace-database:
|
||||||
|
image: postgres:15-alpine
|
||||||
|
hostname: myspace-database
|
||||||
|
container_name: myspace-database
|
||||||
|
networks:
|
||||||
|
myspace-database:
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: myspace
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: ${DATASOURCE_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- myspace-database:/var/lib/postgresql/data/
|
||||||
|
|
||||||
|
myspace-backend:
|
||||||
|
build: .
|
||||||
|
image: myspace-backend:jvm
|
||||||
|
hostname: myspace-backend
|
||||||
|
container_name: myspace-backend
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 8080:8080
|
||||||
|
networks:
|
||||||
|
myspace-database:
|
||||||
|
depends_on:
|
||||||
|
- myspace-database
|
||||||
|
environment:
|
||||||
|
DB_URL: postgresql://myspace-database:5432/myspace
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_PASSWORD: ${DATASOURCE_PASSWORD}
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
myspace-database:
|
||||||
|
|
||||||
|
networks:
|
||||||
|
myspace-database:
|
||||||
93
network-backend/pom.xml
Normal file
93
network-backend/pom.xml
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>social-network</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>network-backend</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-data-panache</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>dev.struchkov.network</groupId>-->
|
||||||
|
<!-- <artifactId>network-data-jooq</artifactId>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-controller-rest</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-liquibase</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-arc</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-micrometer</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-config-yaml</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.quarkus.platform</groupId>
|
||||||
|
<artifactId>quarkus-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>database-migrate</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.liquibase</groupId>
|
||||||
|
<artifactId>liquibase-maven-plugin</artifactId>
|
||||||
|
<version>4.26.0</version>
|
||||||
|
<configuration>
|
||||||
|
<changeLogFile>db/changeLog.xml</changeLogFile>
|
||||||
|
<url>jdbc:${env.DB_URL}</url>
|
||||||
|
<username>${env.DB_USERNAME}</username>
|
||||||
|
<password>${env.DB_PASSWORD}</password>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>uPagge</id>
|
||||||
|
<name>Struchkov Mark</name>
|
||||||
|
<email>mark@struchkov.dev</email>
|
||||||
|
<url>https://mark.struchkov.dev</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package dev.struchkov.network.config;
|
||||||
|
|
||||||
|
import io.quarkus.runtime.StartupEvent;
|
||||||
|
import jakarta.enterprise.event.Observes;
|
||||||
|
import jakarta.inject.Singleton;
|
||||||
|
import liquibase.Contexts;
|
||||||
|
import liquibase.LabelExpression;
|
||||||
|
import liquibase.Liquibase;
|
||||||
|
import liquibase.database.DatabaseFactory;
|
||||||
|
import liquibase.exception.LiquibaseException;
|
||||||
|
import liquibase.resource.ClassLoaderResourceAccessor;
|
||||||
|
import liquibase.resource.ResourceAccessor;
|
||||||
|
import org.eclipse.microprofile.config.inject.ConfigProperty;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
public class LiquibaseConfig {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(LiquibaseConfig.class);
|
||||||
|
|
||||||
|
@ConfigProperty(name = "quarkus.datasource.reactive.url")
|
||||||
|
String datasourceUrl;
|
||||||
|
|
||||||
|
@ConfigProperty(name = "quarkus.datasource.username")
|
||||||
|
String datasourceUsername;
|
||||||
|
|
||||||
|
@ConfigProperty(name = "quarkus.datasource.password")
|
||||||
|
String datasourcePassword;
|
||||||
|
|
||||||
|
@ConfigProperty(name = "quarkus.liquibase.change-log")
|
||||||
|
String changeLogLocation;
|
||||||
|
|
||||||
|
@ConfigProperty(name = "quarkus.liquibase.clean-at-start", defaultValue = "false")
|
||||||
|
boolean cleanAtStart;
|
||||||
|
|
||||||
|
public void runLiquibaseMigration(@Observes StartupEvent event) {
|
||||||
|
System.setProperty("liquibase.secureParsing", "false");
|
||||||
|
final ResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor(Thread.currentThread().getContextClassLoader());
|
||||||
|
try (final Liquibase liquibase = new Liquibase(
|
||||||
|
changeLogLocation,
|
||||||
|
resourceAccessor,
|
||||||
|
DatabaseFactory.getInstance()
|
||||||
|
.openConnection("jdbc:" + datasourceUrl, datasourceUsername, datasourcePassword, null, resourceAccessor))
|
||||||
|
) {
|
||||||
|
if (cleanAtStart) {
|
||||||
|
log.warn("Liquibase drop database");
|
||||||
|
liquibase.dropAll();
|
||||||
|
}
|
||||||
|
liquibase.update(new Contexts(), new LabelExpression());
|
||||||
|
} catch (LiquibaseException e) {
|
||||||
|
log.error("Liquibase error: {}", e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
System.setProperty("liquibase.secureParsing", "true");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
42
network-backend/src/main/resources/application.yml
Normal file
42
network-backend/src/main/resources/application.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
quarkus:
|
||||||
|
application:
|
||||||
|
name: MySpace
|
||||||
|
banner:
|
||||||
|
path: banner.txt
|
||||||
|
http:
|
||||||
|
port: ${PORT:8080}
|
||||||
|
root-path: /myspace
|
||||||
|
smallrye-openapi:
|
||||||
|
security-scheme: jwt
|
||||||
|
datasource:
|
||||||
|
jdbc: false
|
||||||
|
db-kind: postgresql
|
||||||
|
username: ${DB_USERNAME}
|
||||||
|
password: ${DB_PASSWORD}
|
||||||
|
reactive:
|
||||||
|
url: ${DB_URL}
|
||||||
|
max-size: ${DB_POOL_SIZE:100}
|
||||||
|
hibernate-orm:
|
||||||
|
database:
|
||||||
|
default-schema: public
|
||||||
|
generation: none
|
||||||
|
native:
|
||||||
|
resources:
|
||||||
|
includes:
|
||||||
|
- ssl/publicKey.pem
|
||||||
|
smallrye:
|
||||||
|
jwt:
|
||||||
|
sign:
|
||||||
|
key:
|
||||||
|
location: ssl/privateKey.pem
|
||||||
|
mp:
|
||||||
|
jwt:
|
||||||
|
verify:
|
||||||
|
publickey:
|
||||||
|
location: ssl/publicKey.pem
|
||||||
|
issuer: http://localhost:8080
|
||||||
|
"%local-dev":
|
||||||
|
quarkus:
|
||||||
|
hibernate-orm:
|
||||||
|
log:
|
||||||
|
sql: true
|
||||||
8
network-backend/src/main/resources/banner.txt
Normal file
8
network-backend/src/main/resources/banner.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
░▒▓██████████████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓███████▓▒░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓████████▓▒░
|
||||||
|
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
|
||||||
|
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
|
||||||
|
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░░▒▓████████▓▒░▒▓█▓▒░ ░▒▓██████▓▒░
|
||||||
|
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░
|
||||||
|
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
|
||||||
|
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓████████▓▒░
|
||||||
9
network-backend/src/main/resources/db/changeLog.xml
Normal file
9
network-backend/src/main/resources/db/changeLog.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd">
|
||||||
|
|
||||||
|
<include file="v.1.0.0/changelog.xml" relativeToChangelogFile="true"/>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd">
|
||||||
|
|
||||||
|
<changeSet id="2024-03-02-create-table-person" author="struchkov">
|
||||||
|
<createTable tableName="person" remarks="Пользователи системы">
|
||||||
|
<column name="id" type="uuid" remarks="Идентификатор∑">
|
||||||
|
<constraints nullable="false" primaryKey="true"/>
|
||||||
|
</column>
|
||||||
|
<column name="email" type="varchar">
|
||||||
|
<constraints nullable="false" unique="true"/>
|
||||||
|
</column>
|
||||||
|
<column name="first_name" type="varchar" remarks="Имя"/>
|
||||||
|
<column name="surname" type="varchar" remarks="Фамилия"/>
|
||||||
|
<column name="birthday" type="date" remarks="Дата рождения"/>
|
||||||
|
<column name="biography" type="text" remarks="Коротко о себе"/>
|
||||||
|
<column name="city" type="varchar" remarks="Город"/>
|
||||||
|
<column name="hash_password" type="varchar" remarks="Пароль">
|
||||||
|
<constraints nullable="false"/>
|
||||||
|
</column>
|
||||||
|
</createTable>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<databaseChangeLog
|
||||||
|
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd">
|
||||||
|
|
||||||
|
<include file="2024-03-02-create-person-table.xml" relativeToChangelogFile="true"/>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
28
network-backend/src/main/resources/ssl/privateKey.pem
Normal file
28
network-backend/src/main/resources/ssl/privateKey.pem
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDl4OXoNoq5C3mQ
|
||||||
|
hpP+7gwuQEl0jnfuBt2mCWpnHKVEZcksneGXDwvIM2BH/vQBG8PL3DtlhJRwcCpY
|
||||||
|
dY3JOascdNBzGGQIqKOi142TAUI8yjGJ8PxtiB1Wkdhvuyb/vshaIcEZCZPondTA
|
||||||
|
yl+h5TnOYdA7abC+RDB7d6tnLl9YcAlR/Qoq6Tflrq0HtQhXb2aE2mjbd+uI8RFp
|
||||||
|
nzeD4v89cghvQMwUv/cVHsNiILek7++s4lTSe+ScLqqHAwCgVxO8hOjOybOEEb3+
|
||||||
|
LJpKu8E8BanM7Smujd5LFwvB6TBejD/i/Yreaqi9vLaNDRGjDn0CK2njcHkEPu9g
|
||||||
|
5ynIj/dHAgMBAAECggEAGLOoYOHuLuDnHjr9Oj6q5mltZe336zGnrbODUIiJJdFo
|
||||||
|
4wzQH020RBNpPDNPAF4oawaZB1lOI3WaHJ6n2WtYp2/SBRwmMQarbCXiMQgd7a8D
|
||||||
|
JcHUjjyQfStM6QILuHLwJTyipaXG1A8/ERHDYaqNIfqWyAZHwhpND2drmWR9RbZd
|
||||||
|
b/47AXctgCB48Eb1SGG20Q0l//vdpqpO/Kowchs2XPuLIlmpe/5NtAkNtfTIXciA
|
||||||
|
clBxz6r8Z/6HLA4paAFpvBy+RzfPqhDLRYIi09UCxWVSvHmXgdSJV6mHJ45K5jv6
|
||||||
|
hNs3dVm7sjuXKjQLhVdZPjavXPTspci9wlE6CGa7AQKBgQD/f04OQuCSCe67wUKC
|
||||||
|
fjICE/paK0Mr6/qc5Be/d24XC2wPj0xytxtD7IDjsgGklGtAYBqi8hg+yp1d7rOx
|
||||||
|
twqSWLyJL2tpkYpSiFYZuRRtwhT6YPNhUwmu88RMFbuvSw/N1YAd0Nc2o+QjH2C4
|
||||||
|
tv/4Szbl3Aoovmr/gEJS+tKGgQKBgQDmVLBacZTeiy77ag0qmAA95HyV4ANldDnm
|
||||||
|
ZmTJFv+6kSvC7tRm7ONxDAqDf/+Ip0kGAVFwRRpGgWcQkcQ478/2U2tS0OmLQF2E
|
||||||
|
s5i3b9DwV8dDjLqLLK6KVYKnl7hEEjTE52pLKjOxpQ/prIqvBmRiRO9YT5uSJwYh
|
||||||
|
hQCHf37pxwKBgQDPYrotAUPfxogthrVBzsUwwp6Xyj3/zM/jwZE1LPADbJYOGzbm
|
||||||
|
dpJ/E92a9MY4nPBhlKCKWxArB7OspzDcs8K0/6opgIAjdKteSqP4xS472SnGAiQL
|
||||||
|
f6eAhwVy7MEnjDoLzZzslrPZ+jYX/EQ6KvCizgqFkZH9eHLJaYZsbIOuAQKBgQDe
|
||||||
|
/EhLF0DvfkG6xr3+aW96e/SdSGUhWDchtimGgIyNOzPpoTvidR3v+J9JFab2zjUk
|
||||||
|
6ivEjDHW5jo4UVZtZMWpjLMPVw9yb5rZ+OE1XbwiomhYHisOx/AmHojB5WFQDWwm
|
||||||
|
4H8IS9AGAG36ZL9SmNagSGqKzW8oPD10QAX2J9lfSwKBgFGNa8cbfVuaMqntYYdE
|
||||||
|
cMaBr3zD2sjARN8nYcK2/a/o4nK6zcXaMHSuDRsYKwZsD+xjoqiI8kBHfGxYiF4Y
|
||||||
|
f+F5y/UJDngH8vHIpNkJKxaSfC28D/SiSKMQGFjbXn4pZ6eAnqYPsO2PWiglyQpH
|
||||||
|
yFrkfB0T2zdoYGVQ0kowSYiU
|
||||||
|
-----END PRIVATE KEY-----
|
||||||
9
network-backend/src/main/resources/ssl/publicKey.pem
Normal file
9
network-backend/src/main/resources/ssl/publicKey.pem
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5eDl6DaKuQt5kIaT/u4M
|
||||||
|
LkBJdI537gbdpglqZxylRGXJLJ3hlw8LyDNgR/70ARvDy9w7ZYSUcHAqWHWNyTmr
|
||||||
|
HHTQcxhkCKijoteNkwFCPMoxifD8bYgdVpHYb7sm/77IWiHBGQmT6J3UwMpfoeU5
|
||||||
|
zmHQO2mwvkQwe3erZy5fWHAJUf0KKuk35a6tB7UIV29mhNpo23friPERaZ83g+L/
|
||||||
|
PXIIb0DMFL/3FR7DYiC3pO/vrOJU0nvknC6qhwMAoFcTvITozsmzhBG9/iyaSrvB
|
||||||
|
PAWpzO0pro3eSxcLwekwXow/4v2K3mqovby2jQ0Row59Aitp43B5BD7vYOcpyI/3
|
||||||
|
RwIDAQAB
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
35
network-context/pom.xml
Normal file
35
network-context/pom.xml
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>social-network</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>network-context</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-domain</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.smallrye.reactive</groupId>
|
||||||
|
<artifactId>mutiny</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>uPagge</id>
|
||||||
|
<name>Struchkov Mark</name>
|
||||||
|
<email>mark@struchkov.dev</email>
|
||||||
|
<url>https://mark.struchkov.dev</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package dev.struchkov.network.context.repository;
|
||||||
|
|
||||||
|
import dev.struchkov.network.domain.entity.Person;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public interface PersonRepository {
|
||||||
|
|
||||||
|
Uni<Person> save(Person person);
|
||||||
|
|
||||||
|
Uni<Person> findById(UUID personId);
|
||||||
|
|
||||||
|
Uni<Person> findByEmail(String email);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package dev.struchkov.network.context.service;
|
||||||
|
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
|
||||||
|
public interface AuthService {
|
||||||
|
|
||||||
|
Uni<String> login(String email, String password);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package dev.struchkov.network.context.service;
|
||||||
|
|
||||||
|
import dev.struchkov.network.domain.entity.Person;
|
||||||
|
import dev.struchkov.network.domain.person.PersonCreate;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public interface PersonService {
|
||||||
|
|
||||||
|
Uni<Person> register(@Valid PersonCreate createData);
|
||||||
|
|
||||||
|
Uni<Person> getById(UUID userId);
|
||||||
|
|
||||||
|
Uni<Person> getByIdOrThrown(UUID userId);
|
||||||
|
|
||||||
|
Uni<Person> getByEmail(String email);
|
||||||
|
|
||||||
|
}
|
||||||
64
network-controller-rest/pom.xml
Normal file
64
network-controller-rest/pom.xml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>social-network</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>network-controller-rest</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.otus.network</groupId>
|
||||||
|
<artifactId>network-exception</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-context</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-schema-rest</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-resteasy-reactive</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-smallrye-openapi</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-smallrye-jwt</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>uPagge</id>
|
||||||
|
<name>Struchkov Mark</name>
|
||||||
|
<email>mark@struchkov.dev</email>
|
||||||
|
<url>https://mark.struchkov.dev</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package dev.struchkov.network.controller.rest;
|
||||||
|
|
||||||
|
import dev.struchkov.network.context.service.AuthService;
|
||||||
|
import dev.struchkov.network.context.service.PersonService;
|
||||||
|
import dev.struchkov.network.controller.rest.convert.PersonMapper;
|
||||||
|
import dev.struchkov.network.controller.rest.schema.input.PersonLoginRequest;
|
||||||
|
import dev.struchkov.network.controller.rest.schema.input.PersonRegisterRequest;
|
||||||
|
import dev.struchkov.network.controller.rest.schema.output.PersonLoginResponse;
|
||||||
|
import dev.struchkov.network.controller.rest.schema.output.PersonResponse;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import jakarta.annotation.Nonnull;
|
||||||
|
import jakarta.annotation.security.PermitAll;
|
||||||
|
import jakarta.annotation.security.RolesAllowed;
|
||||||
|
import jakarta.ws.rs.Consumes;
|
||||||
|
import jakarta.ws.rs.GET;
|
||||||
|
import jakarta.ws.rs.POST;
|
||||||
|
import jakarta.ws.rs.Path;
|
||||||
|
import jakarta.ws.rs.PathParam;
|
||||||
|
import jakarta.ws.rs.Produces;
|
||||||
|
import jakarta.ws.rs.core.MediaType;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.Operation;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.parameters.RequestBody;
|
||||||
|
import org.eclipse.microprofile.openapi.annotations.tags.Tag;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@Path("user")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Tag(name = "Пользователи", description = "Управление пользователями системы.")
|
||||||
|
public class PersonRestController {
|
||||||
|
|
||||||
|
private final PersonService personService;
|
||||||
|
private final AuthService authService;
|
||||||
|
|
||||||
|
private final PersonMapper personMapper;
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@PermitAll
|
||||||
|
@Path("register")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
@Operation(summary = "Регистрация пользователя")
|
||||||
|
public Uni<PersonResponse> register(@RequestBody PersonRegisterRequest input) {
|
||||||
|
return personService.register(personMapper.toDomain(input))
|
||||||
|
.map(personMapper::toOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@PermitAll
|
||||||
|
@Path("login")
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
@Operation(summary = "Авторизация пользователей")
|
||||||
|
public Uni<PersonLoginResponse> login(@RequestBody PersonLoginRequest input) {
|
||||||
|
return authService.login(input.getEmail(), input.getPassword())
|
||||||
|
.map(accessToken -> PersonLoginResponse.builder().accessToken(accessToken).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
@GET
|
||||||
|
@Path("{userId}")
|
||||||
|
@RolesAllowed({"USER"})
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
@Operation(summary = "Получить пользователя по идентификатору пользователей")
|
||||||
|
public Uni<PersonResponse> getById(
|
||||||
|
@Parameter(required = true, description = "Идентификатор пользователя") @PathParam("userId") @Nonnull UUID userId
|
||||||
|
) {
|
||||||
|
return personService.getByIdOrThrown(userId)
|
||||||
|
.map(personMapper::toOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package dev.struchkov.network.controller.rest.convert;
|
||||||
|
|
||||||
|
import dev.struchkov.network.controller.rest.schema.input.PersonRegisterRequest;
|
||||||
|
import dev.struchkov.network.controller.rest.schema.output.PersonResponse;
|
||||||
|
import dev.struchkov.network.domain.entity.Person;
|
||||||
|
import dev.struchkov.network.domain.person.PersonCreate;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import static org.mapstruct.MappingConstants.ComponentModel.JAKARTA;
|
||||||
|
|
||||||
|
@Mapper(componentModel = JAKARTA)
|
||||||
|
public interface PersonMapper {
|
||||||
|
|
||||||
|
PersonResponse toOutput(Person person);
|
||||||
|
|
||||||
|
PersonCreate toDomain(PersonRegisterRequest input);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package dev.struchkov.network.controller.rest.handler;
|
||||||
|
|
||||||
|
import dev.struchkov.network.controller.rest.schema.error.ValidationErrorData;
|
||||||
|
import dev.struchkov.network.controller.rest.schema.error.ValidationErrorMessage;
|
||||||
|
import jakarta.validation.ConstraintViolationException;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import jakarta.ws.rs.ext.ExceptionMapper;
|
||||||
|
import jakarta.ws.rs.ext.Provider;
|
||||||
|
|
||||||
|
@Provider
|
||||||
|
public class ConstraintViolationExceptionMapper implements ExceptionMapper<ConstraintViolationException> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Response toResponse(ConstraintViolationException e) {
|
||||||
|
return Response.status(Response.Status.BAD_REQUEST)
|
||||||
|
.entity(
|
||||||
|
ValidationErrorMessage.builder()
|
||||||
|
.errors(
|
||||||
|
e.getConstraintViolations().stream()
|
||||||
|
.map(constraintViolation -> ValidationErrorData.builder().message(constraintViolation.getMessage()).build())
|
||||||
|
.toList()
|
||||||
|
)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package dev.struchkov.network.controller.rest.handler;
|
||||||
|
|
||||||
|
import dev.struchkov.network.controller.rest.schema.error.ErrorMessage;
|
||||||
|
import dev.struchkov.network.exception.NotFoundException;
|
||||||
|
import dev.struchkov.network.exception.SocialNetworkException;
|
||||||
|
import jakarta.ws.rs.core.Response;
|
||||||
|
import org.jboss.resteasy.reactive.RestResponse;
|
||||||
|
import org.jboss.resteasy.reactive.server.ServerExceptionMapper;
|
||||||
|
|
||||||
|
public class ExceptionHandler {
|
||||||
|
|
||||||
|
@ServerExceptionMapper
|
||||||
|
public RestResponse<ErrorMessage> mapException(RuntimeException e) {
|
||||||
|
return RestResponse.status(Response.Status.BAD_REQUEST, ErrorMessage.builder().message(e.getMessage()).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ServerExceptionMapper
|
||||||
|
public RestResponse<ErrorMessage> mapException(SocialNetworkException e) {
|
||||||
|
return RestResponse.status(Response.Status.BAD_REQUEST, ErrorMessage.builder().message(e.getMessage()).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ServerExceptionMapper
|
||||||
|
public RestResponse<ErrorMessage> mapException(NotFoundException e) {
|
||||||
|
return RestResponse.status(Response.Status.NOT_FOUND, ErrorMessage.builder().message(e.getMessage()).build());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
60
network-core/pom.xml
Normal file
60
network-core/pom.xml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>social-network</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>network-core</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.otus.network</groupId>
|
||||||
|
<artifactId>network-exception</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-context</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-hibernate-validator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-hibernate-reactive-panache-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-smallrye-jwt-build</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.f4b6a3</groupId>
|
||||||
|
<artifactId>uuid-creator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mindrot</groupId>
|
||||||
|
<artifactId>jbcrypt</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>uPagge</id>
|
||||||
|
<name>Struchkov Mark</name>
|
||||||
|
<email>mark@struchkov.dev</email>
|
||||||
|
<url>https://mark.struchkov.dev</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package dev.struchkov.network.core.service;
|
||||||
|
|
||||||
|
import dev.struchkov.network.context.service.AuthService;
|
||||||
|
import dev.struchkov.network.context.service.PersonService;
|
||||||
|
import dev.struchkov.network.exception.AuthException;
|
||||||
|
import io.smallrye.jwt.build.Jwt;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import static dev.struchkov.network.core.util.PasswordUtils.checkPassword;
|
||||||
|
import static dev.struchkov.network.exception.AuthException.authException;
|
||||||
|
|
||||||
|
@ApplicationScoped
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class AuthServiceImpl implements AuthService {
|
||||||
|
|
||||||
|
private final PersonService personService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Uni<String> login(String email, String password) {
|
||||||
|
return personService.getByEmail(email)
|
||||||
|
.onItem().ifNull().failWith(authException("Ошибка авторизации"))
|
||||||
|
.invoke(person -> {
|
||||||
|
if (!checkPassword(password, person.getHashPassword())) {
|
||||||
|
throw new AuthException("Ошибка авторизации");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.map(
|
||||||
|
person ->
|
||||||
|
Jwt.issuer("http://localhost:8080")
|
||||||
|
.upn(person.getId().toString())
|
||||||
|
.expiresIn(Duration.ofMinutes(15))
|
||||||
|
.groups(Collections.singleton("USER"))
|
||||||
|
.claim("email", person.getEmail())
|
||||||
|
.sign()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package dev.struchkov.network.core.service;
|
||||||
|
|
||||||
|
import com.github.f4b6a3.uuid.UuidCreator;
|
||||||
|
import dev.struchkov.network.context.repository.PersonRepository;
|
||||||
|
import dev.struchkov.network.context.service.PersonService;
|
||||||
|
import dev.struchkov.network.domain.entity.Person;
|
||||||
|
import dev.struchkov.network.domain.person.PersonCreate;
|
||||||
|
import dev.struchkov.network.exception.NotFoundException;
|
||||||
|
import io.quarkus.hibernate.reactive.panache.common.WithSession;
|
||||||
|
import io.quarkus.hibernate.reactive.panache.common.WithTransaction;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import static dev.struchkov.network.core.util.PasswordUtils.hashPassword;
|
||||||
|
import static dev.struchkov.network.exception.RegistrationException.registrationException;
|
||||||
|
|
||||||
|
@ApplicationScoped
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PersonServiceImpl implements PersonService {
|
||||||
|
|
||||||
|
private final PersonRepository repository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@WithTransaction
|
||||||
|
public Uni<Person> register(@Valid PersonCreate createData) {
|
||||||
|
return repository.findByEmail(createData.getEmail())
|
||||||
|
.onItem().ifNotNull().failWith(registrationException("Пользователь с таким email уже зарегистрирован."))
|
||||||
|
.onItem().ifNull().switchTo(
|
||||||
|
() -> repository.save(
|
||||||
|
Person.builder()
|
||||||
|
.id(UuidCreator.getTimeOrderedEpoch())
|
||||||
|
.email(createData.getEmail())
|
||||||
|
.firstName(createData.getFirstName())
|
||||||
|
.surname(createData.getSurname())
|
||||||
|
.biography(createData.getBiography())
|
||||||
|
.hashPassword(hashPassword(createData.getPassword()))
|
||||||
|
.birthday(createData.getBirthday())
|
||||||
|
.city(createData.getCity())
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@WithSession
|
||||||
|
public Uni<Person> getById(UUID userId) {
|
||||||
|
return repository.findById(userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@WithSession
|
||||||
|
public Uni<Person> getByIdOrThrown(UUID userId) {
|
||||||
|
return repository.findById(userId)
|
||||||
|
.onItem().ifNull().failWith(NotFoundException.notFoundException("Пользователь не найден"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@WithSession
|
||||||
|
public Uni<Person> getByEmail(String email) {
|
||||||
|
return repository.findByEmail(email);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package dev.struchkov.network.core.util;
|
||||||
|
|
||||||
|
import lombok.experimental.UtilityClass;
|
||||||
|
import org.mindrot.jbcrypt.BCrypt;
|
||||||
|
|
||||||
|
@UtilityClass
|
||||||
|
public class PasswordUtils {
|
||||||
|
|
||||||
|
public static String hashPassword(String password) {
|
||||||
|
return BCrypt.hashpw(password, BCrypt.gensalt());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean checkPassword(String candidate, String hashedPassword) {
|
||||||
|
return BCrypt.checkpw(candidate, hashedPassword);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
94
network-data-jooq/pom.xml
Normal file
94
network-data-jooq/pom.xml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>social-network</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>network-data-jooq</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.struchkov.network</groupId>
|
||||||
|
<artifactId>network-context</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.enterprise</groupId>
|
||||||
|
<artifactId>jakarta.enterprise.cdi-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.smallrye.reactive</groupId>
|
||||||
|
<artifactId>smallrye-mutiny-vertx-pg-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-reactive-pg-client</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.jooq/jooq -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq</artifactId>
|
||||||
|
<version>3.19.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.postgresql</groupId>
|
||||||
|
<artifactId>postgresql</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>jooq-generate</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jooq</groupId>
|
||||||
|
<artifactId>jooq-codegen-maven</artifactId>
|
||||||
|
<version>3.19.5</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>generate</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<jdbc>
|
||||||
|
<driver>org.postgresql.Driver</driver>
|
||||||
|
<url>jdbc:${env.DB_URL}</url>
|
||||||
|
<user>${env.DB_USERNAME}</user>
|
||||||
|
<password>${env.DB_PASSWORD}</password>
|
||||||
|
</jdbc>
|
||||||
|
<generator>
|
||||||
|
<database>
|
||||||
|
<name>org.jooq.meta.postgres.PostgresDatabase</name>
|
||||||
|
<includes>.*</includes>
|
||||||
|
</database>
|
||||||
|
<target>
|
||||||
|
<packageName>dev.struchkov.network.data.jooq.schema</packageName>
|
||||||
|
<directory>src/main/java</directory>
|
||||||
|
</target>
|
||||||
|
</generator>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
package dev.struchkov.network.data.jooq;
|
||||||
|
|
||||||
|
import dev.struchkov.network.context.repository.PersonRepository;
|
||||||
|
import dev.struchkov.network.data.jooq.mapper.PersonDataMapper;
|
||||||
|
import dev.struchkov.network.domain.entity.Person;
|
||||||
|
import dev.struchkov.network.domain.entity.PersonColumns;
|
||||||
|
import io.smallrye.mutiny.Uni;
|
||||||
|
import io.vertx.mutiny.pgclient.PgPool;
|
||||||
|
import io.vertx.mutiny.sqlclient.PreparedQuery;
|
||||||
|
import io.vertx.mutiny.sqlclient.Query;
|
||||||
|
import io.vertx.mutiny.sqlclient.Row;
|
||||||
|
import io.vertx.mutiny.sqlclient.RowSet;
|
||||||
|
import jakarta.enterprise.context.ApplicationScoped;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.jooq.SQLDialect;
|
||||||
|
import org.jooq.conf.ParamType;
|
||||||
|
import org.jooq.impl.DefaultDSLContext;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
|
import static dev.struchkov.network.data.jooq.schema.public_.tables.Person.PERSON;
|
||||||
|
|
||||||
|
@ApplicationScoped
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class PersonRepositoryImpl implements PersonRepository {
|
||||||
|
|
||||||
|
private static final DefaultDSLContext dsl = new DefaultDSLContext(SQLDialect.POSTGRES);
|
||||||
|
|
||||||
|
private final PgPool pgPool;
|
||||||
|
private final PersonDataMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Uni<Person> save(Person person) {
|
||||||
|
return Uni.createFrom().item(dsl.insertInto(PERSON).set(mapper.toRecord(person)).getSQL(ParamType.NAMED_OR_INLINED))
|
||||||
|
.map(pgPool::query)
|
||||||
|
.flatMap(Query::execute)
|
||||||
|
.onItem().transformToMulti(RowSet::toMulti)
|
||||||
|
.collect().last()
|
||||||
|
.onItem().ifNotNull().transform(toDomain());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Uni<Person> findById(UUID personId) {
|
||||||
|
return Uni.createFrom().item(
|
||||||
|
dsl.selectFrom(PERSON)
|
||||||
|
.where(PERSON.ID.eq(personId))
|
||||||
|
.getSQL(ParamType.NAMED_OR_INLINED)
|
||||||
|
).map(pgPool::preparedQuery)
|
||||||
|
.flatMap(PreparedQuery::execute)
|
||||||
|
.onItem().transformToMulti(RowSet::toMulti)
|
||||||
|
.collect().last()
|
||||||
|
.onItem().ifNotNull().transform(toDomain());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Uni<Person> findByEmail(String email) {
|
||||||
|
return Uni.createFrom().item(
|
||||||
|
dsl.selectFrom(PERSON)
|
||||||
|
.where(PERSON.EMAIL.eq(email))
|
||||||
|
.getSQL(ParamType.NAMED_OR_INLINED)
|
||||||
|
).map(pgPool::preparedQuery)
|
||||||
|
.flatMap(PreparedQuery::execute)
|
||||||
|
.onItem().transformToMulti(RowSet::toMulti)
|
||||||
|
.collect().last()
|
||||||
|
.onItem().ifNotNull().transform(toDomain());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Function<Row, Person> toDomain() {
|
||||||
|
return row -> Person.builder()
|
||||||
|
.id(row.getUUID(PersonColumns.id))
|
||||||
|
.city(row.getString(PersonColumns.city))
|
||||||
|
.surname(row.getString(PersonColumns.surname))
|
||||||
|
.hashPassword(row.getString(PersonColumns.hashPassword))
|
||||||
|
.firstName(row.getString(PersonColumns.firstName))
|
||||||
|
.birthday(row.getLocalDate(PersonColumns.birthday))
|
||||||
|
.biography(row.getString(PersonColumns.biography))
|
||||||
|
.email(row.getString(PersonColumns.email))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package dev.struchkov.network.data.jooq.mapper;
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.public_.tables.records.PersonRecord;
|
||||||
|
import dev.struchkov.network.domain.entity.Person;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
|
||||||
|
import static org.mapstruct.MappingConstants.ComponentModel.JAKARTA;
|
||||||
|
|
||||||
|
@Mapper(componentModel = JAKARTA)
|
||||||
|
public interface PersonDataMapper {
|
||||||
|
|
||||||
|
Person toDomain(PersonRecord record);
|
||||||
|
|
||||||
|
PersonRecord toRecord(Person domain);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.PgCatalog;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.public_.Public;
|
||||||
|
import org.jooq.Constants;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.impl.CatalogImpl;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class DefaultCatalog extends CatalogImpl {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>DEFAULT_CATALOG</code>
|
||||||
|
*/
|
||||||
|
public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The schema <code>information_schema</code>.
|
||||||
|
*/
|
||||||
|
public final InformationSchema INFORMATION_SCHEMA = InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The schema <code>pg_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final PgCatalog PG_CATALOG = PgCatalog.PG_CATALOG;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The schema <code>public</code>.
|
||||||
|
*/
|
||||||
|
public final Public PUBLIC = Public.PUBLIC;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No further instances allowed
|
||||||
|
*/
|
||||||
|
private DefaultCatalog() {
|
||||||
|
super("");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final List<Schema> getSchemas() {
|
||||||
|
return Arrays.asList(
|
||||||
|
InformationSchema.INFORMATION_SCHEMA,
|
||||||
|
PgCatalog.PG_CATALOG,
|
||||||
|
Public.PUBLIC
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A reference to the 3.19 minor release of the code generator. If this
|
||||||
|
* doesn't compile, it's because the runtime library uses an older minor
|
||||||
|
* release, namely: 3.19. You can turn off the generation of this reference
|
||||||
|
* by specifying /configuration/generator/generate/jooqVersionReference
|
||||||
|
*/
|
||||||
|
private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_19;
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema;
|
||||||
|
|
||||||
|
|
||||||
|
import org.jooq.Domain;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.LazySchema;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience access to all Domains in information_schema.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Domains {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The domain <code>information_schema.cardinal_number</code>.
|
||||||
|
*/
|
||||||
|
public static final Domain<Integer> CARDINAL_NUMBER = Internal.createDomain(
|
||||||
|
schema()
|
||||||
|
, DSL.name("cardinal_number")
|
||||||
|
, SQLDataType.INTEGER
|
||||||
|
, Internal.createCheck(null, null, "CHECK ((VALUE >= 0))")
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The domain <code>information_schema.character_data</code>.
|
||||||
|
*/
|
||||||
|
public static final Domain<String> CHARACTER_DATA = Internal.createDomain(
|
||||||
|
schema()
|
||||||
|
, DSL.name("character_data")
|
||||||
|
, SQLDataType.VARCHAR
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The domain <code>information_schema.sql_identifier</code>.
|
||||||
|
*/
|
||||||
|
public static final Domain<String> SQL_IDENTIFIER = Internal.createDomain(
|
||||||
|
schema()
|
||||||
|
, DSL.name("sql_identifier")
|
||||||
|
, SQLDataType.VARCHAR
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The domain <code>information_schema.time_stamp</code>.
|
||||||
|
*/
|
||||||
|
public static final Domain<OffsetDateTime> TIME_STAMP = Internal.createDomain(
|
||||||
|
schema()
|
||||||
|
, DSL.name("time_stamp")
|
||||||
|
, SQLDataType.TIMESTAMPWITHTIMEZONE(2).defaultValue(DSL.field(DSL.raw("CURRENT_TIMESTAMP(2)"), SQLDataType.TIMESTAMPWITHTIMEZONE))
|
||||||
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The domain <code>information_schema.yes_or_no</code>.
|
||||||
|
*/
|
||||||
|
public static final Domain<String> YES_OR_NO = Internal.createDomain(
|
||||||
|
schema()
|
||||||
|
, DSL.name("yes_or_no")
|
||||||
|
, SQLDataType.VARCHAR(3)
|
||||||
|
, Internal.createCheck(null, null, "CHECK (((VALUE)::text = ANY ((ARRAY['YES'::character varying, 'NO'::character varying])::text[])))")
|
||||||
|
);
|
||||||
|
|
||||||
|
private static final Schema schema() {
|
||||||
|
return new LazySchema(DSL.name("information_schema"), DSL.comment(""), () -> InformationSchema.INFORMATION_SCHEMA);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,590 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.DefaultCatalog;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.AdministrableRoleAuthorizations;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ApplicableRoles;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Attributes;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CharacterSets;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CheckConstraintRoutineUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CheckConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CollationCharacterSetApplicability;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Collations;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnDomainUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnPrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnUdtUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Columns;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ConstraintColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ConstraintTableUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.DataTypePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.DomainConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.DomainUdtUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ElementTypes;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.EnabledRoles;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignDataWrapperOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignDataWrappers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignServerOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignServers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignTableOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignTables;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.InformationSchemaCatalogName;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.KeyColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Parameters;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ReferentialConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleColumnGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleRoutineGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleTableGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleUdtGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleUsageGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutinePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineRoutineUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineSequenceUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineTableUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Routines;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Schemata;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Sequences;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlFeatures;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlImplementationInfo;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlParts;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlSizing;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.TableConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.TablePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Tables;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Transforms;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.TriggeredUpdateColumns;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Triggers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UdtPrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UsagePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UserDefinedTypes;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UserMappingOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UserMappings;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ViewColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ViewRoutineUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ViewTableUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Views;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignDataWrappers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignServers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignTableColumns;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignTables;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgUserMappings;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records._PgExpandarrayRecord;
|
||||||
|
import org.jooq.Catalog;
|
||||||
|
import org.jooq.Configuration;
|
||||||
|
import org.jooq.Domain;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Result;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.impl.SchemaImpl;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class InformationSchema extends SchemaImpl {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema</code>
|
||||||
|
*/
|
||||||
|
public static final InformationSchema INFORMATION_SCHEMA = new InformationSchema();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_expandarray</code>.
|
||||||
|
*/
|
||||||
|
public final _PgExpandarray _PG_EXPANDARRAY = _PgExpandarray._PG_EXPANDARRAY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_expandarray</code>.
|
||||||
|
*/
|
||||||
|
public static Result<_PgExpandarrayRecord> _PG_EXPANDARRAY(
|
||||||
|
Configuration configuration
|
||||||
|
, Object[] __1
|
||||||
|
) {
|
||||||
|
return configuration.dsl().selectFrom(dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
)).fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_expandarray</code> as a table.
|
||||||
|
*/
|
||||||
|
public static _PgExpandarray _PG_EXPANDARRAY(
|
||||||
|
Object[] __1
|
||||||
|
) {
|
||||||
|
return dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_expandarray</code> as a table.
|
||||||
|
*/
|
||||||
|
public static _PgExpandarray _PG_EXPANDARRAY(
|
||||||
|
Field<Object[]> __1
|
||||||
|
) {
|
||||||
|
return dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_data_wrappers</code>.
|
||||||
|
*/
|
||||||
|
public final _PgForeignDataWrappers _PG_FOREIGN_DATA_WRAPPERS = _PgForeignDataWrappers._PG_FOREIGN_DATA_WRAPPERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_servers</code>.
|
||||||
|
*/
|
||||||
|
public final _PgForeignServers _PG_FOREIGN_SERVERS = _PgForeignServers._PG_FOREIGN_SERVERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_table_columns</code>.
|
||||||
|
*/
|
||||||
|
public final _PgForeignTableColumns _PG_FOREIGN_TABLE_COLUMNS = _PgForeignTableColumns._PG_FOREIGN_TABLE_COLUMNS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_tables</code>.
|
||||||
|
*/
|
||||||
|
public final _PgForeignTables _PG_FOREIGN_TABLES = _PgForeignTables._PG_FOREIGN_TABLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_user_mappings</code>.
|
||||||
|
*/
|
||||||
|
public final _PgUserMappings _PG_USER_MAPPINGS = _PgUserMappings._PG_USER_MAPPINGS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table
|
||||||
|
* <code>information_schema.administrable_role_authorizations</code>.
|
||||||
|
*/
|
||||||
|
public final AdministrableRoleAuthorizations ADMINISTRABLE_ROLE_AUTHORIZATIONS = AdministrableRoleAuthorizations.ADMINISTRABLE_ROLE_AUTHORIZATIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.applicable_roles</code>.
|
||||||
|
*/
|
||||||
|
public final ApplicableRoles APPLICABLE_ROLES = ApplicableRoles.APPLICABLE_ROLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.attributes</code>.
|
||||||
|
*/
|
||||||
|
public final Attributes ATTRIBUTES = Attributes.ATTRIBUTES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.character_sets</code>.
|
||||||
|
*/
|
||||||
|
public final CharacterSets CHARACTER_SETS = CharacterSets.CHARACTER_SETS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.check_constraint_routine_usage</code>.
|
||||||
|
*/
|
||||||
|
public final CheckConstraintRoutineUsage CHECK_CONSTRAINT_ROUTINE_USAGE = CheckConstraintRoutineUsage.CHECK_CONSTRAINT_ROUTINE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.check_constraints</code>.
|
||||||
|
*/
|
||||||
|
public final CheckConstraints CHECK_CONSTRAINTS = CheckConstraints.CHECK_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table
|
||||||
|
* <code>information_schema.collation_character_set_applicability</code>.
|
||||||
|
*/
|
||||||
|
public final CollationCharacterSetApplicability COLLATION_CHARACTER_SET_APPLICABILITY = CollationCharacterSetApplicability.COLLATION_CHARACTER_SET_APPLICABILITY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.collations</code>.
|
||||||
|
*/
|
||||||
|
public final Collations COLLATIONS = Collations.COLLATIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ColumnColumnUsage COLUMN_COLUMN_USAGE = ColumnColumnUsage.COLUMN_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_domain_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ColumnDomainUsage COLUMN_DOMAIN_USAGE = ColumnDomainUsage.COLUMN_DOMAIN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_options</code>.
|
||||||
|
*/
|
||||||
|
public final ColumnOptions COLUMN_OPTIONS = ColumnOptions.COLUMN_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_privileges</code>.
|
||||||
|
*/
|
||||||
|
public final ColumnPrivileges COLUMN_PRIVILEGES = ColumnPrivileges.COLUMN_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_udt_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ColumnUdtUsage COLUMN_UDT_USAGE = ColumnUdtUsage.COLUMN_UDT_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.columns</code>.
|
||||||
|
*/
|
||||||
|
public final Columns COLUMNS = Columns.COLUMNS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.constraint_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ConstraintColumnUsage CONSTRAINT_COLUMN_USAGE = ConstraintColumnUsage.CONSTRAINT_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.constraint_table_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ConstraintTableUsage CONSTRAINT_TABLE_USAGE = ConstraintTableUsage.CONSTRAINT_TABLE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.data_type_privileges</code>.
|
||||||
|
*/
|
||||||
|
public final DataTypePrivileges DATA_TYPE_PRIVILEGES = DataTypePrivileges.DATA_TYPE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.domain_constraints</code>.
|
||||||
|
*/
|
||||||
|
public final DomainConstraints DOMAIN_CONSTRAINTS = DomainConstraints.DOMAIN_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.domain_udt_usage</code>.
|
||||||
|
*/
|
||||||
|
public final DomainUdtUsage DOMAIN_UDT_USAGE = DomainUdtUsage.DOMAIN_UDT_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.domains</code>.
|
||||||
|
*/
|
||||||
|
public final Domains DOMAINS = Domains.DOMAINS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.element_types</code>.
|
||||||
|
*/
|
||||||
|
public final ElementTypes ELEMENT_TYPES = ElementTypes.ELEMENT_TYPES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.enabled_roles</code>.
|
||||||
|
*/
|
||||||
|
public final EnabledRoles ENABLED_ROLES = EnabledRoles.ENABLED_ROLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_data_wrapper_options</code>.
|
||||||
|
*/
|
||||||
|
public final ForeignDataWrapperOptions FOREIGN_DATA_WRAPPER_OPTIONS = ForeignDataWrapperOptions.FOREIGN_DATA_WRAPPER_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_data_wrappers</code>.
|
||||||
|
*/
|
||||||
|
public final ForeignDataWrappers FOREIGN_DATA_WRAPPERS = ForeignDataWrappers.FOREIGN_DATA_WRAPPERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_server_options</code>.
|
||||||
|
*/
|
||||||
|
public final ForeignServerOptions FOREIGN_SERVER_OPTIONS = ForeignServerOptions.FOREIGN_SERVER_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_servers</code>.
|
||||||
|
*/
|
||||||
|
public final ForeignServers FOREIGN_SERVERS = ForeignServers.FOREIGN_SERVERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_table_options</code>.
|
||||||
|
*/
|
||||||
|
public final ForeignTableOptions FOREIGN_TABLE_OPTIONS = ForeignTableOptions.FOREIGN_TABLE_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_tables</code>.
|
||||||
|
*/
|
||||||
|
public final ForeignTables FOREIGN_TABLES = ForeignTables.FOREIGN_TABLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table
|
||||||
|
* <code>information_schema.information_schema_catalog_name</code>.
|
||||||
|
*/
|
||||||
|
public final InformationSchemaCatalogName INFORMATION_SCHEMA_CATALOG_NAME = InformationSchemaCatalogName.INFORMATION_SCHEMA_CATALOG_NAME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.key_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public final KeyColumnUsage KEY_COLUMN_USAGE = KeyColumnUsage.KEY_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.parameters</code>.
|
||||||
|
*/
|
||||||
|
public final Parameters PARAMETERS = Parameters.PARAMETERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.referential_constraints</code>.
|
||||||
|
*/
|
||||||
|
public final ReferentialConstraints REFERENTIAL_CONSTRAINTS = ReferentialConstraints.REFERENTIAL_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_column_grants</code>.
|
||||||
|
*/
|
||||||
|
public final RoleColumnGrants ROLE_COLUMN_GRANTS = RoleColumnGrants.ROLE_COLUMN_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_routine_grants</code>.
|
||||||
|
*/
|
||||||
|
public final RoleRoutineGrants ROLE_ROUTINE_GRANTS = RoleRoutineGrants.ROLE_ROUTINE_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_table_grants</code>.
|
||||||
|
*/
|
||||||
|
public final RoleTableGrants ROLE_TABLE_GRANTS = RoleTableGrants.ROLE_TABLE_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_udt_grants</code>.
|
||||||
|
*/
|
||||||
|
public final RoleUdtGrants ROLE_UDT_GRANTS = RoleUdtGrants.ROLE_UDT_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_usage_grants</code>.
|
||||||
|
*/
|
||||||
|
public final RoleUsageGrants ROLE_USAGE_GRANTS = RoleUsageGrants.ROLE_USAGE_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public final RoutineColumnUsage ROUTINE_COLUMN_USAGE = RoutineColumnUsage.ROUTINE_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_privileges</code>.
|
||||||
|
*/
|
||||||
|
public final RoutinePrivileges ROUTINE_PRIVILEGES = RoutinePrivileges.ROUTINE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_routine_usage</code>.
|
||||||
|
*/
|
||||||
|
public final RoutineRoutineUsage ROUTINE_ROUTINE_USAGE = RoutineRoutineUsage.ROUTINE_ROUTINE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_sequence_usage</code>.
|
||||||
|
*/
|
||||||
|
public final RoutineSequenceUsage ROUTINE_SEQUENCE_USAGE = RoutineSequenceUsage.ROUTINE_SEQUENCE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_table_usage</code>.
|
||||||
|
*/
|
||||||
|
public final RoutineTableUsage ROUTINE_TABLE_USAGE = RoutineTableUsage.ROUTINE_TABLE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routines</code>.
|
||||||
|
*/
|
||||||
|
public final Routines ROUTINES = Routines.ROUTINES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.schemata</code>.
|
||||||
|
*/
|
||||||
|
public final Schemata SCHEMATA = Schemata.SCHEMATA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sequences</code>.
|
||||||
|
*/
|
||||||
|
public final Sequences SEQUENCES = Sequences.SEQUENCES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_features</code>.
|
||||||
|
*/
|
||||||
|
public final SqlFeatures SQL_FEATURES = SqlFeatures.SQL_FEATURES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_implementation_info</code>.
|
||||||
|
*/
|
||||||
|
public final SqlImplementationInfo SQL_IMPLEMENTATION_INFO = SqlImplementationInfo.SQL_IMPLEMENTATION_INFO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_parts</code>.
|
||||||
|
*/
|
||||||
|
public final SqlParts SQL_PARTS = SqlParts.SQL_PARTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_sizing</code>.
|
||||||
|
*/
|
||||||
|
public final SqlSizing SQL_SIZING = SqlSizing.SQL_SIZING;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.table_constraints</code>.
|
||||||
|
*/
|
||||||
|
public final TableConstraints TABLE_CONSTRAINTS = TableConstraints.TABLE_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.table_privileges</code>.
|
||||||
|
*/
|
||||||
|
public final TablePrivileges TABLE_PRIVILEGES = TablePrivileges.TABLE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.tables</code>.
|
||||||
|
*/
|
||||||
|
public final Tables TABLES = Tables.TABLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.transforms</code>.
|
||||||
|
*/
|
||||||
|
public final Transforms TRANSFORMS = Transforms.TRANSFORMS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.triggered_update_columns</code>.
|
||||||
|
*/
|
||||||
|
public final TriggeredUpdateColumns TRIGGERED_UPDATE_COLUMNS = TriggeredUpdateColumns.TRIGGERED_UPDATE_COLUMNS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.triggers</code>.
|
||||||
|
*/
|
||||||
|
public final Triggers TRIGGERS = Triggers.TRIGGERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.udt_privileges</code>.
|
||||||
|
*/
|
||||||
|
public final UdtPrivileges UDT_PRIVILEGES = UdtPrivileges.UDT_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.usage_privileges</code>.
|
||||||
|
*/
|
||||||
|
public final UsagePrivileges USAGE_PRIVILEGES = UsagePrivileges.USAGE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.user_defined_types</code>.
|
||||||
|
*/
|
||||||
|
public final UserDefinedTypes USER_DEFINED_TYPES = UserDefinedTypes.USER_DEFINED_TYPES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.user_mapping_options</code>.
|
||||||
|
*/
|
||||||
|
public final UserMappingOptions USER_MAPPING_OPTIONS = UserMappingOptions.USER_MAPPING_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.user_mappings</code>.
|
||||||
|
*/
|
||||||
|
public final UserMappings USER_MAPPINGS = UserMappings.USER_MAPPINGS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.view_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ViewColumnUsage VIEW_COLUMN_USAGE = ViewColumnUsage.VIEW_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.view_routine_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ViewRoutineUsage VIEW_ROUTINE_USAGE = ViewRoutineUsage.VIEW_ROUTINE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.view_table_usage</code>.
|
||||||
|
*/
|
||||||
|
public final ViewTableUsage VIEW_TABLE_USAGE = ViewTableUsage.VIEW_TABLE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.views</code>.
|
||||||
|
*/
|
||||||
|
public final Views VIEWS = Views.VIEWS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No further instances allowed
|
||||||
|
*/
|
||||||
|
private InformationSchema() {
|
||||||
|
super("information_schema", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Catalog getCatalog() {
|
||||||
|
return DefaultCatalog.DEFAULT_CATALOG;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final List<Domain<?>> getDomains() {
|
||||||
|
return Arrays.asList(
|
||||||
|
dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER,
|
||||||
|
dev.struchkov.network.data.jooq.schema.information_schema.Domains.CHARACTER_DATA,
|
||||||
|
dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER,
|
||||||
|
dev.struchkov.network.data.jooq.schema.information_schema.Domains.TIME_STAMP,
|
||||||
|
dev.struchkov.network.data.jooq.schema.information_schema.Domains.YES_OR_NO
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final List<Table<?>> getTables() {
|
||||||
|
return Arrays.asList(
|
||||||
|
_PgExpandarray._PG_EXPANDARRAY,
|
||||||
|
_PgForeignDataWrappers._PG_FOREIGN_DATA_WRAPPERS,
|
||||||
|
_PgForeignServers._PG_FOREIGN_SERVERS,
|
||||||
|
_PgForeignTableColumns._PG_FOREIGN_TABLE_COLUMNS,
|
||||||
|
_PgForeignTables._PG_FOREIGN_TABLES,
|
||||||
|
_PgUserMappings._PG_USER_MAPPINGS,
|
||||||
|
AdministrableRoleAuthorizations.ADMINISTRABLE_ROLE_AUTHORIZATIONS,
|
||||||
|
ApplicableRoles.APPLICABLE_ROLES,
|
||||||
|
Attributes.ATTRIBUTES,
|
||||||
|
CharacterSets.CHARACTER_SETS,
|
||||||
|
CheckConstraintRoutineUsage.CHECK_CONSTRAINT_ROUTINE_USAGE,
|
||||||
|
CheckConstraints.CHECK_CONSTRAINTS,
|
||||||
|
CollationCharacterSetApplicability.COLLATION_CHARACTER_SET_APPLICABILITY,
|
||||||
|
Collations.COLLATIONS,
|
||||||
|
ColumnColumnUsage.COLUMN_COLUMN_USAGE,
|
||||||
|
ColumnDomainUsage.COLUMN_DOMAIN_USAGE,
|
||||||
|
ColumnOptions.COLUMN_OPTIONS,
|
||||||
|
ColumnPrivileges.COLUMN_PRIVILEGES,
|
||||||
|
ColumnUdtUsage.COLUMN_UDT_USAGE,
|
||||||
|
Columns.COLUMNS,
|
||||||
|
ConstraintColumnUsage.CONSTRAINT_COLUMN_USAGE,
|
||||||
|
ConstraintTableUsage.CONSTRAINT_TABLE_USAGE,
|
||||||
|
DataTypePrivileges.DATA_TYPE_PRIVILEGES,
|
||||||
|
DomainConstraints.DOMAIN_CONSTRAINTS,
|
||||||
|
DomainUdtUsage.DOMAIN_UDT_USAGE,
|
||||||
|
Domains.DOMAINS,
|
||||||
|
ElementTypes.ELEMENT_TYPES,
|
||||||
|
EnabledRoles.ENABLED_ROLES,
|
||||||
|
ForeignDataWrapperOptions.FOREIGN_DATA_WRAPPER_OPTIONS,
|
||||||
|
ForeignDataWrappers.FOREIGN_DATA_WRAPPERS,
|
||||||
|
ForeignServerOptions.FOREIGN_SERVER_OPTIONS,
|
||||||
|
ForeignServers.FOREIGN_SERVERS,
|
||||||
|
ForeignTableOptions.FOREIGN_TABLE_OPTIONS,
|
||||||
|
ForeignTables.FOREIGN_TABLES,
|
||||||
|
InformationSchemaCatalogName.INFORMATION_SCHEMA_CATALOG_NAME,
|
||||||
|
KeyColumnUsage.KEY_COLUMN_USAGE,
|
||||||
|
Parameters.PARAMETERS,
|
||||||
|
ReferentialConstraints.REFERENTIAL_CONSTRAINTS,
|
||||||
|
RoleColumnGrants.ROLE_COLUMN_GRANTS,
|
||||||
|
RoleRoutineGrants.ROLE_ROUTINE_GRANTS,
|
||||||
|
RoleTableGrants.ROLE_TABLE_GRANTS,
|
||||||
|
RoleUdtGrants.ROLE_UDT_GRANTS,
|
||||||
|
RoleUsageGrants.ROLE_USAGE_GRANTS,
|
||||||
|
RoutineColumnUsage.ROUTINE_COLUMN_USAGE,
|
||||||
|
RoutinePrivileges.ROUTINE_PRIVILEGES,
|
||||||
|
RoutineRoutineUsage.ROUTINE_ROUTINE_USAGE,
|
||||||
|
RoutineSequenceUsage.ROUTINE_SEQUENCE_USAGE,
|
||||||
|
RoutineTableUsage.ROUTINE_TABLE_USAGE,
|
||||||
|
Routines.ROUTINES,
|
||||||
|
Schemata.SCHEMATA,
|
||||||
|
Sequences.SEQUENCES,
|
||||||
|
SqlFeatures.SQL_FEATURES,
|
||||||
|
SqlImplementationInfo.SQL_IMPLEMENTATION_INFO,
|
||||||
|
SqlParts.SQL_PARTS,
|
||||||
|
SqlSizing.SQL_SIZING,
|
||||||
|
TableConstraints.TABLE_CONSTRAINTS,
|
||||||
|
TablePrivileges.TABLE_PRIVILEGES,
|
||||||
|
Tables.TABLES,
|
||||||
|
Transforms.TRANSFORMS,
|
||||||
|
TriggeredUpdateColumns.TRIGGERED_UPDATE_COLUMNS,
|
||||||
|
Triggers.TRIGGERS,
|
||||||
|
UdtPrivileges.UDT_PRIVILEGES,
|
||||||
|
UsagePrivileges.USAGE_PRIVILEGES,
|
||||||
|
UserDefinedTypes.USER_DEFINED_TYPES,
|
||||||
|
UserMappingOptions.USER_MAPPING_OPTIONS,
|
||||||
|
UserMappings.USER_MAPPINGS,
|
||||||
|
ViewColumnUsage.VIEW_COLUMN_USAGE,
|
||||||
|
ViewRoutineUsage.VIEW_ROUTINE_USAGE,
|
||||||
|
ViewTableUsage.VIEW_TABLE_USAGE,
|
||||||
|
Views.VIEWS
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,508 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgCharMaxLength;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgCharOctetLength;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgDatetimePrecision;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgIndexPosition;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgIntervalType;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgNumericPrecision;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgNumericPrecisionRadix;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgNumericScale;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgTruetypid;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.routines._PgTruetypmod;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records._PgExpandarrayRecord;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.records.PgAttributeRecord;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.records.PgTypeRecord;
|
||||||
|
import org.jooq.Configuration;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Result;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience access to all stored procedures and functions in
|
||||||
|
* information_schema.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Routines {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_char_max_length</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgCharMaxLength(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgCharMaxLength f = new _PgCharMaxLength();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_char_max_length</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgCharMaxLength(
|
||||||
|
Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgCharMaxLength f = new _PgCharMaxLength();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_char_max_length</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgCharMaxLength(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> typmod
|
||||||
|
) {
|
||||||
|
_PgCharMaxLength f = new _PgCharMaxLength();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_char_octet_length</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgCharOctetLength(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgCharOctetLength f = new _PgCharOctetLength();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_char_octet_length</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgCharOctetLength(
|
||||||
|
Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgCharOctetLength f = new _PgCharOctetLength();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_char_octet_length</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgCharOctetLength(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> typmod
|
||||||
|
) {
|
||||||
|
_PgCharOctetLength f = new _PgCharOctetLength();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_datetime_precision</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgDatetimePrecision(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgDatetimePrecision f = new _PgDatetimePrecision();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_datetime_precision</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgDatetimePrecision(
|
||||||
|
Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgDatetimePrecision f = new _PgDatetimePrecision();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_datetime_precision</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgDatetimePrecision(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> typmod
|
||||||
|
) {
|
||||||
|
_PgDatetimePrecision f = new _PgDatetimePrecision();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_index_position</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgIndexPosition(
|
||||||
|
Configuration configuration
|
||||||
|
, Long __1
|
||||||
|
, Short __2
|
||||||
|
) {
|
||||||
|
_PgIndexPosition f = new _PgIndexPosition();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_index_position</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgIndexPosition(
|
||||||
|
Long __1
|
||||||
|
, Short __2
|
||||||
|
) {
|
||||||
|
_PgIndexPosition f = new _PgIndexPosition();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_index_position</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgIndexPosition(
|
||||||
|
Field<Long> __1
|
||||||
|
, Field<Short> __2
|
||||||
|
) {
|
||||||
|
_PgIndexPosition f = new _PgIndexPosition();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_interval_type</code>
|
||||||
|
*/
|
||||||
|
public static String _PgIntervalType(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer mod
|
||||||
|
) {
|
||||||
|
_PgIntervalType f = new _PgIntervalType();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setMod(mod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_interval_type</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<String> _PgIntervalType(
|
||||||
|
Long typid
|
||||||
|
, Integer mod
|
||||||
|
) {
|
||||||
|
_PgIntervalType f = new _PgIntervalType();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setMod(mod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_interval_type</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<String> _PgIntervalType(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> mod
|
||||||
|
) {
|
||||||
|
_PgIntervalType f = new _PgIntervalType();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setMod(mod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_numeric_precision</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgNumericPrecision(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgNumericPrecision f = new _PgNumericPrecision();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_numeric_precision</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgNumericPrecision(
|
||||||
|
Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgNumericPrecision f = new _PgNumericPrecision();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_numeric_precision</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgNumericPrecision(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> typmod
|
||||||
|
) {
|
||||||
|
_PgNumericPrecision f = new _PgNumericPrecision();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_numeric_precision_radix</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgNumericPrecisionRadix(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgNumericPrecisionRadix f = new _PgNumericPrecisionRadix();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_numeric_precision_radix</code> as a
|
||||||
|
* field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgNumericPrecisionRadix(
|
||||||
|
Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgNumericPrecisionRadix f = new _PgNumericPrecisionRadix();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_numeric_precision_radix</code> as a
|
||||||
|
* field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgNumericPrecisionRadix(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> typmod
|
||||||
|
) {
|
||||||
|
_PgNumericPrecisionRadix f = new _PgNumericPrecisionRadix();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_numeric_scale</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgNumericScale(
|
||||||
|
Configuration configuration
|
||||||
|
, Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgNumericScale f = new _PgNumericScale();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_numeric_scale</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgNumericScale(
|
||||||
|
Long typid
|
||||||
|
, Integer typmod
|
||||||
|
) {
|
||||||
|
_PgNumericScale f = new _PgNumericScale();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_numeric_scale</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgNumericScale(
|
||||||
|
Field<Long> typid
|
||||||
|
, Field<Integer> typmod
|
||||||
|
) {
|
||||||
|
_PgNumericScale f = new _PgNumericScale();
|
||||||
|
f.setTypid(typid);
|
||||||
|
f.setTypmod(typmod);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_truetypid</code>
|
||||||
|
*/
|
||||||
|
public static Long _PgTruetypid(
|
||||||
|
Configuration configuration
|
||||||
|
, PgAttributeRecord __1
|
||||||
|
, PgTypeRecord __2
|
||||||
|
) {
|
||||||
|
_PgTruetypid f = new _PgTruetypid();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_truetypid</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Long> _PgTruetypid(
|
||||||
|
PgAttributeRecord __1
|
||||||
|
, PgTypeRecord __2
|
||||||
|
) {
|
||||||
|
_PgTruetypid f = new _PgTruetypid();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_truetypid</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Long> _PgTruetypid(
|
||||||
|
Field<PgAttributeRecord> __1
|
||||||
|
, Field<PgTypeRecord> __2
|
||||||
|
) {
|
||||||
|
_PgTruetypid f = new _PgTruetypid();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_truetypmod</code>
|
||||||
|
*/
|
||||||
|
public static Integer _PgTruetypmod(
|
||||||
|
Configuration configuration
|
||||||
|
, PgAttributeRecord __1
|
||||||
|
, PgTypeRecord __2
|
||||||
|
) {
|
||||||
|
_PgTruetypmod f = new _PgTruetypmod();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
f.execute(configuration);
|
||||||
|
return f.getReturnValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_truetypmod</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgTruetypmod(
|
||||||
|
PgAttributeRecord __1
|
||||||
|
, PgTypeRecord __2
|
||||||
|
) {
|
||||||
|
_PgTruetypmod f = new _PgTruetypmod();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_truetypmod</code> as a field.
|
||||||
|
*/
|
||||||
|
public static Field<Integer> _PgTruetypmod(
|
||||||
|
Field<PgAttributeRecord> __1
|
||||||
|
, Field<PgTypeRecord> __2
|
||||||
|
) {
|
||||||
|
_PgTruetypmod f = new _PgTruetypmod();
|
||||||
|
f.set__1(__1);
|
||||||
|
f.set__2(__2);
|
||||||
|
|
||||||
|
return f.asField();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_expandarray</code>.
|
||||||
|
*/
|
||||||
|
public static Result<_PgExpandarrayRecord> _PgExpandarray(
|
||||||
|
Configuration configuration
|
||||||
|
, Object[] __1
|
||||||
|
) {
|
||||||
|
return configuration.dsl().selectFrom(dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
)).fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_expandarray</code> as a table.
|
||||||
|
*/
|
||||||
|
public static _PgExpandarray _PgExpandarray(
|
||||||
|
Object[] __1
|
||||||
|
) {
|
||||||
|
return dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_expandarray</code> as a table.
|
||||||
|
*/
|
||||||
|
public static _PgExpandarray _PgExpandarray(
|
||||||
|
Field<Object[]> __1
|
||||||
|
) {
|
||||||
|
return dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,474 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.AdministrableRoleAuthorizations;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ApplicableRoles;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Attributes;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CharacterSets;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CheckConstraintRoutineUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CheckConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.CollationCharacterSetApplicability;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Collations;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnDomainUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnPrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ColumnUdtUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Columns;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ConstraintColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ConstraintTableUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.DataTypePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.DomainConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.DomainUdtUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ElementTypes;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.EnabledRoles;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignDataWrapperOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignDataWrappers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignServerOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignServers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignTableOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ForeignTables;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.InformationSchemaCatalogName;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.KeyColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Parameters;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ReferentialConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleColumnGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleRoutineGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleTableGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleUdtGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoleUsageGrants;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutinePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineRoutineUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineSequenceUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.RoutineTableUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Routines;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Schemata;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Sequences;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlFeatures;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlImplementationInfo;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlParts;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.SqlSizing;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.TableConstraints;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.TablePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Transforms;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.TriggeredUpdateColumns;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Triggers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UdtPrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UsagePrivileges;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UserDefinedTypes;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UserMappingOptions;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.UserMappings;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ViewColumnUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ViewRoutineUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.ViewTableUsage;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.Views;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignDataWrappers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignServers;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignTableColumns;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgForeignTables;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables._PgUserMappings;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records._PgExpandarrayRecord;
|
||||||
|
import org.jooq.Configuration;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Result;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience access to all tables in information_schema.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Tables {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_expandarray</code>.
|
||||||
|
*/
|
||||||
|
public static final _PgExpandarray _PG_EXPANDARRAY = _PgExpandarray._PG_EXPANDARRAY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Call <code>information_schema._pg_expandarray</code>.
|
||||||
|
*/
|
||||||
|
public static Result<_PgExpandarrayRecord> _PG_EXPANDARRAY(
|
||||||
|
Configuration configuration
|
||||||
|
, Object[] __1
|
||||||
|
) {
|
||||||
|
return configuration.dsl().selectFrom(dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
)).fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_expandarray</code> as a table.
|
||||||
|
*/
|
||||||
|
public static _PgExpandarray _PG_EXPANDARRAY(
|
||||||
|
Object[] __1
|
||||||
|
) {
|
||||||
|
return dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get <code>information_schema._pg_expandarray</code> as a table.
|
||||||
|
*/
|
||||||
|
public static _PgExpandarray _PG_EXPANDARRAY(
|
||||||
|
Field<Object[]> __1
|
||||||
|
) {
|
||||||
|
return dev.struchkov.network.data.jooq.schema.information_schema.tables._PgExpandarray._PG_EXPANDARRAY.call(
|
||||||
|
__1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_data_wrappers</code>.
|
||||||
|
*/
|
||||||
|
public static final _PgForeignDataWrappers _PG_FOREIGN_DATA_WRAPPERS = _PgForeignDataWrappers._PG_FOREIGN_DATA_WRAPPERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_servers</code>.
|
||||||
|
*/
|
||||||
|
public static final _PgForeignServers _PG_FOREIGN_SERVERS = _PgForeignServers._PG_FOREIGN_SERVERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_table_columns</code>.
|
||||||
|
*/
|
||||||
|
public static final _PgForeignTableColumns _PG_FOREIGN_TABLE_COLUMNS = _PgForeignTableColumns._PG_FOREIGN_TABLE_COLUMNS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_foreign_tables</code>.
|
||||||
|
*/
|
||||||
|
public static final _PgForeignTables _PG_FOREIGN_TABLES = _PgForeignTables._PG_FOREIGN_TABLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema._pg_user_mappings</code>.
|
||||||
|
*/
|
||||||
|
public static final _PgUserMappings _PG_USER_MAPPINGS = _PgUserMappings._PG_USER_MAPPINGS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table
|
||||||
|
* <code>information_schema.administrable_role_authorizations</code>.
|
||||||
|
*/
|
||||||
|
public static final AdministrableRoleAuthorizations ADMINISTRABLE_ROLE_AUTHORIZATIONS = AdministrableRoleAuthorizations.ADMINISTRABLE_ROLE_AUTHORIZATIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.applicable_roles</code>.
|
||||||
|
*/
|
||||||
|
public static final ApplicableRoles APPLICABLE_ROLES = ApplicableRoles.APPLICABLE_ROLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.attributes</code>.
|
||||||
|
*/
|
||||||
|
public static final Attributes ATTRIBUTES = Attributes.ATTRIBUTES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.character_sets</code>.
|
||||||
|
*/
|
||||||
|
public static final CharacterSets CHARACTER_SETS = CharacterSets.CHARACTER_SETS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.check_constraint_routine_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final CheckConstraintRoutineUsage CHECK_CONSTRAINT_ROUTINE_USAGE = CheckConstraintRoutineUsage.CHECK_CONSTRAINT_ROUTINE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.check_constraints</code>.
|
||||||
|
*/
|
||||||
|
public static final CheckConstraints CHECK_CONSTRAINTS = CheckConstraints.CHECK_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table
|
||||||
|
* <code>information_schema.collation_character_set_applicability</code>.
|
||||||
|
*/
|
||||||
|
public static final CollationCharacterSetApplicability COLLATION_CHARACTER_SET_APPLICABILITY = CollationCharacterSetApplicability.COLLATION_CHARACTER_SET_APPLICABILITY;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.collations</code>.
|
||||||
|
*/
|
||||||
|
public static final Collations COLLATIONS = Collations.COLLATIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ColumnColumnUsage COLUMN_COLUMN_USAGE = ColumnColumnUsage.COLUMN_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_domain_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ColumnDomainUsage COLUMN_DOMAIN_USAGE = ColumnDomainUsage.COLUMN_DOMAIN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_options</code>.
|
||||||
|
*/
|
||||||
|
public static final ColumnOptions COLUMN_OPTIONS = ColumnOptions.COLUMN_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_privileges</code>.
|
||||||
|
*/
|
||||||
|
public static final ColumnPrivileges COLUMN_PRIVILEGES = ColumnPrivileges.COLUMN_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.column_udt_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ColumnUdtUsage COLUMN_UDT_USAGE = ColumnUdtUsage.COLUMN_UDT_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.columns</code>.
|
||||||
|
*/
|
||||||
|
public static final Columns COLUMNS = Columns.COLUMNS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.constraint_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ConstraintColumnUsage CONSTRAINT_COLUMN_USAGE = ConstraintColumnUsage.CONSTRAINT_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.constraint_table_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ConstraintTableUsage CONSTRAINT_TABLE_USAGE = ConstraintTableUsage.CONSTRAINT_TABLE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.data_type_privileges</code>.
|
||||||
|
*/
|
||||||
|
public static final DataTypePrivileges DATA_TYPE_PRIVILEGES = DataTypePrivileges.DATA_TYPE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.domain_constraints</code>.
|
||||||
|
*/
|
||||||
|
public static final DomainConstraints DOMAIN_CONSTRAINTS = DomainConstraints.DOMAIN_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.domain_udt_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final DomainUdtUsage DOMAIN_UDT_USAGE = DomainUdtUsage.DOMAIN_UDT_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.domains</code>.
|
||||||
|
*/
|
||||||
|
public static final Domains DOMAINS = Domains.DOMAINS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.element_types</code>.
|
||||||
|
*/
|
||||||
|
public static final ElementTypes ELEMENT_TYPES = ElementTypes.ELEMENT_TYPES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.enabled_roles</code>.
|
||||||
|
*/
|
||||||
|
public static final EnabledRoles ENABLED_ROLES = EnabledRoles.ENABLED_ROLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_data_wrapper_options</code>.
|
||||||
|
*/
|
||||||
|
public static final ForeignDataWrapperOptions FOREIGN_DATA_WRAPPER_OPTIONS = ForeignDataWrapperOptions.FOREIGN_DATA_WRAPPER_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_data_wrappers</code>.
|
||||||
|
*/
|
||||||
|
public static final ForeignDataWrappers FOREIGN_DATA_WRAPPERS = ForeignDataWrappers.FOREIGN_DATA_WRAPPERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_server_options</code>.
|
||||||
|
*/
|
||||||
|
public static final ForeignServerOptions FOREIGN_SERVER_OPTIONS = ForeignServerOptions.FOREIGN_SERVER_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_servers</code>.
|
||||||
|
*/
|
||||||
|
public static final ForeignServers FOREIGN_SERVERS = ForeignServers.FOREIGN_SERVERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_table_options</code>.
|
||||||
|
*/
|
||||||
|
public static final ForeignTableOptions FOREIGN_TABLE_OPTIONS = ForeignTableOptions.FOREIGN_TABLE_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.foreign_tables</code>.
|
||||||
|
*/
|
||||||
|
public static final ForeignTables FOREIGN_TABLES = ForeignTables.FOREIGN_TABLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table
|
||||||
|
* <code>information_schema.information_schema_catalog_name</code>.
|
||||||
|
*/
|
||||||
|
public static final InformationSchemaCatalogName INFORMATION_SCHEMA_CATALOG_NAME = InformationSchemaCatalogName.INFORMATION_SCHEMA_CATALOG_NAME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.key_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final KeyColumnUsage KEY_COLUMN_USAGE = KeyColumnUsage.KEY_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.parameters</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameters PARAMETERS = Parameters.PARAMETERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.referential_constraints</code>.
|
||||||
|
*/
|
||||||
|
public static final ReferentialConstraints REFERENTIAL_CONSTRAINTS = ReferentialConstraints.REFERENTIAL_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_column_grants</code>.
|
||||||
|
*/
|
||||||
|
public static final RoleColumnGrants ROLE_COLUMN_GRANTS = RoleColumnGrants.ROLE_COLUMN_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_routine_grants</code>.
|
||||||
|
*/
|
||||||
|
public static final RoleRoutineGrants ROLE_ROUTINE_GRANTS = RoleRoutineGrants.ROLE_ROUTINE_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_table_grants</code>.
|
||||||
|
*/
|
||||||
|
public static final RoleTableGrants ROLE_TABLE_GRANTS = RoleTableGrants.ROLE_TABLE_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_udt_grants</code>.
|
||||||
|
*/
|
||||||
|
public static final RoleUdtGrants ROLE_UDT_GRANTS = RoleUdtGrants.ROLE_UDT_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.role_usage_grants</code>.
|
||||||
|
*/
|
||||||
|
public static final RoleUsageGrants ROLE_USAGE_GRANTS = RoleUsageGrants.ROLE_USAGE_GRANTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final RoutineColumnUsage ROUTINE_COLUMN_USAGE = RoutineColumnUsage.ROUTINE_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_privileges</code>.
|
||||||
|
*/
|
||||||
|
public static final RoutinePrivileges ROUTINE_PRIVILEGES = RoutinePrivileges.ROUTINE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_routine_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final RoutineRoutineUsage ROUTINE_ROUTINE_USAGE = RoutineRoutineUsage.ROUTINE_ROUTINE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_sequence_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final RoutineSequenceUsage ROUTINE_SEQUENCE_USAGE = RoutineSequenceUsage.ROUTINE_SEQUENCE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routine_table_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final RoutineTableUsage ROUTINE_TABLE_USAGE = RoutineTableUsage.ROUTINE_TABLE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.routines</code>.
|
||||||
|
*/
|
||||||
|
public static final Routines ROUTINES = Routines.ROUTINES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.schemata</code>.
|
||||||
|
*/
|
||||||
|
public static final Schemata SCHEMATA = Schemata.SCHEMATA;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sequences</code>.
|
||||||
|
*/
|
||||||
|
public static final Sequences SEQUENCES = Sequences.SEQUENCES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_features</code>.
|
||||||
|
*/
|
||||||
|
public static final SqlFeatures SQL_FEATURES = SqlFeatures.SQL_FEATURES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_implementation_info</code>.
|
||||||
|
*/
|
||||||
|
public static final SqlImplementationInfo SQL_IMPLEMENTATION_INFO = SqlImplementationInfo.SQL_IMPLEMENTATION_INFO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_parts</code>.
|
||||||
|
*/
|
||||||
|
public static final SqlParts SQL_PARTS = SqlParts.SQL_PARTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.sql_sizing</code>.
|
||||||
|
*/
|
||||||
|
public static final SqlSizing SQL_SIZING = SqlSizing.SQL_SIZING;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.table_constraints</code>.
|
||||||
|
*/
|
||||||
|
public static final TableConstraints TABLE_CONSTRAINTS = TableConstraints.TABLE_CONSTRAINTS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.table_privileges</code>.
|
||||||
|
*/
|
||||||
|
public static final TablePrivileges TABLE_PRIVILEGES = TablePrivileges.TABLE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.tables</code>.
|
||||||
|
*/
|
||||||
|
public static final dev.struchkov.network.data.jooq.schema.information_schema.tables.Tables TABLES = dev.struchkov.network.data.jooq.schema.information_schema.tables.Tables.TABLES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.transforms</code>.
|
||||||
|
*/
|
||||||
|
public static final Transforms TRANSFORMS = Transforms.TRANSFORMS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.triggered_update_columns</code>.
|
||||||
|
*/
|
||||||
|
public static final TriggeredUpdateColumns TRIGGERED_UPDATE_COLUMNS = TriggeredUpdateColumns.TRIGGERED_UPDATE_COLUMNS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.triggers</code>.
|
||||||
|
*/
|
||||||
|
public static final Triggers TRIGGERS = Triggers.TRIGGERS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.udt_privileges</code>.
|
||||||
|
*/
|
||||||
|
public static final UdtPrivileges UDT_PRIVILEGES = UdtPrivileges.UDT_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.usage_privileges</code>.
|
||||||
|
*/
|
||||||
|
public static final UsagePrivileges USAGE_PRIVILEGES = UsagePrivileges.USAGE_PRIVILEGES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.user_defined_types</code>.
|
||||||
|
*/
|
||||||
|
public static final UserDefinedTypes USER_DEFINED_TYPES = UserDefinedTypes.USER_DEFINED_TYPES;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.user_mapping_options</code>.
|
||||||
|
*/
|
||||||
|
public static final UserMappingOptions USER_MAPPING_OPTIONS = UserMappingOptions.USER_MAPPING_OPTIONS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.user_mappings</code>.
|
||||||
|
*/
|
||||||
|
public static final UserMappings USER_MAPPINGS = UserMappings.USER_MAPPINGS;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.view_column_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ViewColumnUsage VIEW_COLUMN_USAGE = ViewColumnUsage.VIEW_COLUMN_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.view_routine_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ViewRoutineUsage VIEW_ROUTINE_USAGE = ViewRoutineUsage.VIEW_ROUTINE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.view_table_usage</code>.
|
||||||
|
*/
|
||||||
|
public static final ViewTableUsage VIEW_TABLE_USAGE = ViewTableUsage.VIEW_TABLE_USAGE;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The table <code>information_schema.views</code>.
|
||||||
|
*/
|
||||||
|
public static final Views VIEWS = Views.VIEWS;
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgCharMaxLength extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_char_max_length.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_char_max_length.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_char_max_length.typmod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> TYPMOD = Internal.createParameter("typmod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgCharMaxLength() {
|
||||||
|
super("_pg_char_max_length", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(TYPMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypmod(Integer value) {
|
||||||
|
setValue(TYPMOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypmod(Field<Integer> field) {
|
||||||
|
setField(TYPMOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgCharOctetLength extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_char_octet_length.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_char_octet_length.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_char_octet_length.typmod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> TYPMOD = Internal.createParameter("typmod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgCharOctetLength() {
|
||||||
|
super("_pg_char_octet_length", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(TYPMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypmod(Integer value) {
|
||||||
|
setValue(TYPMOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypmod(Field<Integer> field) {
|
||||||
|
setField(TYPMOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgDatetimePrecision extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_datetime_precision.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_datetime_precision.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_datetime_precision.typmod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> TYPMOD = Internal.createParameter("typmod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgDatetimePrecision() {
|
||||||
|
super("_pg_datetime_precision", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(TYPMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypmod(Integer value) {
|
||||||
|
setValue(TYPMOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypmod(Field<Integer> field) {
|
||||||
|
setField(TYPMOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgIndexPosition extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_index_position.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_index_position._1</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> _1 = Internal.createParameter("_1", SQLDataType.BIGINT, false, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_index_position._2</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Short> _2 = Internal.createParameter("_2", SQLDataType.SMALLINT, false, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgIndexPosition() {
|
||||||
|
super("_pg_index_position", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(_1);
|
||||||
|
addInParameter(_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_1</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void set__1(Long value) {
|
||||||
|
setValue(_1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_1</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void set__1(Field<Long> field) {
|
||||||
|
setField(_1, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_2</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void set__2(Short value) {
|
||||||
|
setValue(_2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_2</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void set__2(Field<Short> field) {
|
||||||
|
setField(_2, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgIntervalType extends AbstractRoutine<String> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_interval_type.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<String> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.CLOB, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_interval_type.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_interval_type.mod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> MOD = Internal.createParameter("mod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgIntervalType() {
|
||||||
|
super("_pg_interval_type", InformationSchema.INFORMATION_SCHEMA, SQLDataType.CLOB);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(MOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>mod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setMod(Integer value) {
|
||||||
|
setValue(MOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>mod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setMod(Field<Integer> field) {
|
||||||
|
setField(MOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgNumericPrecision extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_precision.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_precision.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_precision.typmod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> TYPMOD = Internal.createParameter("typmod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgNumericPrecision() {
|
||||||
|
super("_pg_numeric_precision", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(TYPMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypmod(Integer value) {
|
||||||
|
setValue(TYPMOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypmod(Field<Integer> field) {
|
||||||
|
setField(TYPMOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgNumericPrecisionRadix extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_precision_radix.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_precision_radix.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_precision_radix.typmod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> TYPMOD = Internal.createParameter("typmod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgNumericPrecisionRadix() {
|
||||||
|
super("_pg_numeric_precision_radix", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(TYPMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypmod(Integer value) {
|
||||||
|
setValue(TYPMOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypmod(Field<Integer> field) {
|
||||||
|
setField(TYPMOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgNumericScale extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_numeric_scale.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_numeric_scale.typid</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> TYPID = Internal.createParameter("typid", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_numeric_scale.typmod</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> TYPMOD = Internal.createParameter("typmod", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgNumericScale() {
|
||||||
|
super("_pg_numeric_scale", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(TYPID);
|
||||||
|
addInParameter(TYPMOD);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypid(Long value) {
|
||||||
|
setValue(TYPID, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typid</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypid(Field<Long> field) {
|
||||||
|
setField(TYPID, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void setTypmod(Integer value) {
|
||||||
|
setValue(TYPMOD, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>typmod</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void setTypmod(Field<Integer> field) {
|
||||||
|
setField(TYPMOD, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.PgAttribute;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.PgType;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.records.PgAttributeRecord;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.records.PgTypeRecord;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgTruetypid extends AbstractRoutine<Long> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_truetypid.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Long> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.BIGINT, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_truetypid._1</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<PgAttributeRecord> _1 = Internal.createParameter("_1", PgAttribute.PG_ATTRIBUTE.getDataType(), false, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_truetypid._2</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<PgTypeRecord> _2 = Internal.createParameter("_2", PgType.PG_TYPE.getDataType(), false, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgTruetypid() {
|
||||||
|
super("_pg_truetypid", InformationSchema.INFORMATION_SCHEMA, SQLDataType.BIGINT);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(_1);
|
||||||
|
addInParameter(_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_1</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void set__1(PgAttributeRecord value) {
|
||||||
|
setValue(_1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_1</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void set__1(Field<PgAttributeRecord> field) {
|
||||||
|
setField(_1, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_2</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void set__2(PgTypeRecord value) {
|
||||||
|
setValue(_2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_2</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void set__2(Field<PgTypeRecord> field) {
|
||||||
|
setField(_2, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.routines;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.PgAttribute;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.PgType;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.records.PgAttributeRecord;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.pg_catalog.tables.records.PgTypeRecord;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Parameter;
|
||||||
|
import org.jooq.impl.AbstractRoutine;
|
||||||
|
import org.jooq.impl.Internal;
|
||||||
|
import org.jooq.impl.SQLDataType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class _PgTruetypmod extends AbstractRoutine<Integer> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter
|
||||||
|
* <code>information_schema._pg_truetypmod.RETURN_VALUE</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<Integer> RETURN_VALUE = Internal.createParameter("RETURN_VALUE", SQLDataType.INTEGER, false, false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_truetypmod._1</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<PgAttributeRecord> _1 = Internal.createParameter("_1", PgAttribute.PG_ATTRIBUTE.getDataType(), false, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The parameter <code>information_schema._pg_truetypmod._2</code>.
|
||||||
|
*/
|
||||||
|
public static final Parameter<PgTypeRecord> _2 = Internal.createParameter("_2", PgType.PG_TYPE.getDataType(), false, true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new routine call instance
|
||||||
|
*/
|
||||||
|
public _PgTruetypmod() {
|
||||||
|
super("_pg_truetypmod", InformationSchema.INFORMATION_SCHEMA, SQLDataType.INTEGER);
|
||||||
|
|
||||||
|
setReturnParameter(RETURN_VALUE);
|
||||||
|
addInParameter(_1);
|
||||||
|
addInParameter(_2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_1</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void set__1(PgAttributeRecord value) {
|
||||||
|
setValue(_1, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_1</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void set__1(Field<PgAttributeRecord> field) {
|
||||||
|
setField(_1, field);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_2</code> parameter IN value to the routine
|
||||||
|
*/
|
||||||
|
public void set__2(PgTypeRecord value) {
|
||||||
|
setValue(_2, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the <code>_2</code> parameter to the function to be used with a
|
||||||
|
* {@link org.jooq.Select} statement
|
||||||
|
*/
|
||||||
|
public void set__2(Field<PgTypeRecord> field) {
|
||||||
|
setField(_2, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,236 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.AdministrableRoleAuthorizationsRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class AdministrableRoleAuthorizations extends TableImpl<AdministrableRoleAuthorizationsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.administrable_role_authorizations</code>
|
||||||
|
*/
|
||||||
|
public static final AdministrableRoleAuthorizations ADMINISTRABLE_ROLE_AUTHORIZATIONS = new AdministrableRoleAuthorizations();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<AdministrableRoleAuthorizationsRecord> getRecordType() {
|
||||||
|
return AdministrableRoleAuthorizationsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.administrable_role_authorizations.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AdministrableRoleAuthorizationsRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.administrable_role_authorizations.role_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AdministrableRoleAuthorizationsRecord, String> ROLE_NAME = createField(DSL.name("role_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.administrable_role_authorizations.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AdministrableRoleAuthorizationsRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private AdministrableRoleAuthorizations(Name alias, Table<AdministrableRoleAuthorizationsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AdministrableRoleAuthorizations(Name alias, Table<AdministrableRoleAuthorizationsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "administrable_role_authorizations" as SELECT applicable_roles.grantee,
|
||||||
|
applicable_roles.role_name,
|
||||||
|
applicable_roles.is_grantable
|
||||||
|
FROM information_schema.applicable_roles
|
||||||
|
WHERE ((applicable_roles.is_grantable)::text = 'YES'::text);
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.administrable_role_authorizations</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public AdministrableRoleAuthorizations(String alias) {
|
||||||
|
this(DSL.name(alias), ADMINISTRABLE_ROLE_AUTHORIZATIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.administrable_role_authorizations</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public AdministrableRoleAuthorizations(Name alias) {
|
||||||
|
this(alias, ADMINISTRABLE_ROLE_AUTHORIZATIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a
|
||||||
|
* <code>information_schema.administrable_role_authorizations</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public AdministrableRoleAuthorizations() {
|
||||||
|
this(DSL.name("administrable_role_authorizations"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations as(String alias) {
|
||||||
|
return new AdministrableRoleAuthorizations(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations as(Name alias) {
|
||||||
|
return new AdministrableRoleAuthorizations(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations as(Table<?> alias) {
|
||||||
|
return new AdministrableRoleAuthorizations(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations rename(String name) {
|
||||||
|
return new AdministrableRoleAuthorizations(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations rename(Name name) {
|
||||||
|
return new AdministrableRoleAuthorizations(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations rename(Table<?> name) {
|
||||||
|
return new AdministrableRoleAuthorizations(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations where(Condition condition) {
|
||||||
|
return new AdministrableRoleAuthorizations(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public AdministrableRoleAuthorizations where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public AdministrableRoleAuthorizations where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public AdministrableRoleAuthorizations where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public AdministrableRoleAuthorizations where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AdministrableRoleAuthorizations whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ApplicableRolesRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ApplicableRoles extends TableImpl<ApplicableRolesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.applicable_roles</code>
|
||||||
|
*/
|
||||||
|
public static final ApplicableRoles APPLICABLE_ROLES = new ApplicableRoles();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ApplicableRolesRecord> getRecordType() {
|
||||||
|
return ApplicableRolesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.applicable_roles.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ApplicableRolesRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.applicable_roles.role_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ApplicableRolesRecord, String> ROLE_NAME = createField(DSL.name("role_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.applicable_roles.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ApplicableRolesRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ApplicableRoles(Name alias, Table<ApplicableRolesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApplicableRoles(Name alias, Table<ApplicableRolesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "applicable_roles" as SELECT (a.rolname)::information_schema.sql_identifier AS grantee,
|
||||||
|
(b.rolname)::information_schema.sql_identifier AS role_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN m.admin_option THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_grantable
|
||||||
|
FROM ((( SELECT pg_auth_members.member,
|
||||||
|
pg_auth_members.roleid,
|
||||||
|
pg_auth_members.admin_option
|
||||||
|
FROM pg_auth_members
|
||||||
|
UNION
|
||||||
|
SELECT pg_database.datdba,
|
||||||
|
pg_authid.oid,
|
||||||
|
false
|
||||||
|
FROM pg_database,
|
||||||
|
pg_authid
|
||||||
|
WHERE ((pg_database.datname = current_database()) AND (pg_authid.rolname = 'pg_database_owner'::name))) m
|
||||||
|
JOIN pg_authid a ON ((m.member = a.oid)))
|
||||||
|
JOIN pg_authid b ON ((m.roleid = b.oid)))
|
||||||
|
WHERE pg_has_role(a.oid, 'USAGE'::text);
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.applicable_roles</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ApplicableRoles(String alias) {
|
||||||
|
this(DSL.name(alias), APPLICABLE_ROLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.applicable_roles</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ApplicableRoles(Name alias) {
|
||||||
|
this(alias, APPLICABLE_ROLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.applicable_roles</code> table reference
|
||||||
|
*/
|
||||||
|
public ApplicableRoles() {
|
||||||
|
this(DSL.name("applicable_roles"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles as(String alias) {
|
||||||
|
return new ApplicableRoles(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles as(Name alias) {
|
||||||
|
return new ApplicableRoles(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles as(Table<?> alias) {
|
||||||
|
return new ApplicableRoles(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles rename(String name) {
|
||||||
|
return new ApplicableRoles(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles rename(Name name) {
|
||||||
|
return new ApplicableRoles(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles rename(Table<?> name) {
|
||||||
|
return new ApplicableRoles(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles where(Condition condition) {
|
||||||
|
return new ApplicableRoles(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ApplicableRoles where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ApplicableRoles where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ApplicableRoles where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ApplicableRoles where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ApplicableRoles whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,425 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.AttributesRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Attributes extends TableImpl<AttributesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.attributes</code>
|
||||||
|
*/
|
||||||
|
public static final Attributes ATTRIBUTES = new Attributes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<AttributesRecord> getRecordType() {
|
||||||
|
return AttributesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.attribute_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> ATTRIBUTE_NAME = createField(DSL.name("attribute_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.ordinal_position</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.attribute_default</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> ATTRIBUTE_DEFAULT = createField(DSL.name("attribute_default"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.is_nullable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> IS_NULLABLE = createField(DSL.name("is_nullable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> DATA_TYPE = createField(DSL.name("data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.character_maximum_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.character_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.attribute_udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> ATTRIBUTE_UDT_CATALOG = createField(DSL.name("attribute_udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.attribute_udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> ATTRIBUTE_UDT_SCHEMA = createField(DSL.name("attribute_udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.attribute_udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> ATTRIBUTE_UDT_NAME = createField(DSL.name("attribute_udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> SCOPE_NAME = createField(DSL.name("scope_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, Integer> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.attributes.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.attributes.is_derived_reference_attribute</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<AttributesRecord, String> IS_DERIVED_REFERENCE_ATTRIBUTE = createField(DSL.name("is_derived_reference_attribute"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Attributes(Name alias, Table<AttributesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Attributes(Name alias, Table<AttributesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "attributes" as SELECT (current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS udt_name,
|
||||||
|
(a.attname)::information_schema.sql_identifier AS attribute_name,
|
||||||
|
(a.attnum)::information_schema.cardinal_number AS ordinal_position,
|
||||||
|
(pg_get_expr(ad.adbin, ad.adrelid))::information_schema.character_data AS attribute_default,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (a.attnotnull OR ((t.typtype = 'd'::"char") AND t.typnotnull)) THEN 'NO'::text
|
||||||
|
ELSE 'YES'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_nullable,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN ((t.typelem <> (0)::oid) AND (t.typlen = '-1'::integer)) THEN 'ARRAY'::text
|
||||||
|
WHEN (nt.nspname = 'pg_catalog'::name) THEN format_type(a.atttypid, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END)::information_schema.character_data AS data_type,
|
||||||
|
(information_schema._pg_char_max_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS character_maximum_length,
|
||||||
|
(information_schema._pg_char_octet_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS character_octet_length,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nco.nspname IS NOT NULL) THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(nco.nspname)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(co.collname)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(information_schema._pg_numeric_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(information_schema._pg_numeric_precision_radix(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(information_schema._pg_numeric_scale(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(information_schema._pg_datetime_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS datetime_precision,
|
||||||
|
(information_schema._pg_interval_type(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.character_data AS interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS interval_precision,
|
||||||
|
(current_database())::information_schema.sql_identifier AS attribute_udt_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS attribute_udt_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS attribute_udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS maximum_cardinality,
|
||||||
|
(a.attnum)::information_schema.sql_identifier AS dtd_identifier,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS is_derived_reference_attribute
|
||||||
|
FROM ((((pg_attribute a
|
||||||
|
LEFT JOIN pg_attrdef ad ON (((a.attrelid = ad.adrelid) AND (a.attnum = ad.adnum))))
|
||||||
|
JOIN (pg_class c
|
||||||
|
JOIN pg_namespace nc ON ((c.relnamespace = nc.oid))) ON ((a.attrelid = c.oid)))
|
||||||
|
JOIN (pg_type t
|
||||||
|
JOIN pg_namespace nt ON ((t.typnamespace = nt.oid))) ON ((a.atttypid = t.oid)))
|
||||||
|
LEFT JOIN (pg_collation co
|
||||||
|
JOIN pg_namespace nco ON ((co.collnamespace = nco.oid))) ON (((a.attcollation = co.oid) AND ((nco.nspname <> 'pg_catalog'::name) OR (co.collname <> 'default'::name)))))
|
||||||
|
WHERE ((a.attnum > 0) AND (NOT a.attisdropped) AND (c.relkind = 'c'::"char") AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_type_privilege(c.reltype, 'USAGE'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.attributes</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Attributes(String alias) {
|
||||||
|
this(DSL.name(alias), ATTRIBUTES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.attributes</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Attributes(Name alias) {
|
||||||
|
this(alias, ATTRIBUTES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.attributes</code> table reference
|
||||||
|
*/
|
||||||
|
public Attributes() {
|
||||||
|
this(DSL.name("attributes"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Attributes as(String alias) {
|
||||||
|
return new Attributes(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Attributes as(Name alias) {
|
||||||
|
return new Attributes(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Attributes as(Table<?> alias) {
|
||||||
|
return new Attributes(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes rename(String name) {
|
||||||
|
return new Attributes(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes rename(Name name) {
|
||||||
|
return new Attributes(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes rename(Table<?> name) {
|
||||||
|
return new Attributes(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes where(Condition condition) {
|
||||||
|
return new Attributes(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Attributes where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Attributes where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Attributes where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Attributes where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Attributes whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,273 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.CharacterSetsRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class CharacterSets extends TableImpl<CharacterSetsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.character_sets</code>
|
||||||
|
*/
|
||||||
|
public static final CharacterSets CHARACTER_SETS = new CharacterSets();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<CharacterSetsRecord> getRecordType() {
|
||||||
|
return CharacterSetsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.character_repertoire</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> CHARACTER_REPERTOIRE = createField(DSL.name("character_repertoire"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.character_sets.form_of_use</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> FORM_OF_USE = createField(DSL.name("form_of_use"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.default_collate_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> DEFAULT_COLLATE_CATALOG = createField(DSL.name("default_collate_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.default_collate_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> DEFAULT_COLLATE_SCHEMA = createField(DSL.name("default_collate_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.character_sets.default_collate_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CharacterSetsRecord, String> DEFAULT_COLLATE_NAME = createField(DSL.name("default_collate_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private CharacterSets(Name alias, Table<CharacterSetsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CharacterSets(Name alias, Table<CharacterSetsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "character_sets" as SELECT (NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(getdatabaseencoding())::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (getdatabaseencoding() = 'UTF8'::name) THEN 'UCS'::name
|
||||||
|
ELSE getdatabaseencoding()
|
||||||
|
END)::information_schema.sql_identifier AS character_repertoire,
|
||||||
|
(getdatabaseencoding())::information_schema.sql_identifier AS form_of_use,
|
||||||
|
(current_database())::information_schema.sql_identifier AS default_collate_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS default_collate_schema,
|
||||||
|
(c.collname)::information_schema.sql_identifier AS default_collate_name
|
||||||
|
FROM (pg_database d
|
||||||
|
LEFT JOIN (pg_collation c
|
||||||
|
JOIN pg_namespace nc ON ((c.collnamespace = nc.oid))) ON (((d.datcollate = c.collcollate) AND (d.datctype = c.collctype))))
|
||||||
|
WHERE (d.datname = current_database())
|
||||||
|
ORDER BY (char_length((c.collname)::text)) DESC, c.collname
|
||||||
|
LIMIT 1;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.character_sets</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CharacterSets(String alias) {
|
||||||
|
this(DSL.name(alias), CHARACTER_SETS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.character_sets</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CharacterSets(Name alias) {
|
||||||
|
this(alias, CHARACTER_SETS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.character_sets</code> table reference
|
||||||
|
*/
|
||||||
|
public CharacterSets() {
|
||||||
|
this(DSL.name("character_sets"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharacterSets as(String alias) {
|
||||||
|
return new CharacterSets(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharacterSets as(Name alias) {
|
||||||
|
return new CharacterSets(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CharacterSets as(Table<?> alias) {
|
||||||
|
return new CharacterSets(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets rename(String name) {
|
||||||
|
return new CharacterSets(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets rename(Name name) {
|
||||||
|
return new CharacterSets(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets rename(Table<?> name) {
|
||||||
|
return new CharacterSets(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets where(Condition condition) {
|
||||||
|
return new CharacterSets(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CharacterSets where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CharacterSets where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CharacterSets where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CharacterSets where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CharacterSets whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.CheckConstraintRoutineUsageRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class CheckConstraintRoutineUsage extends TableImpl<CheckConstraintRoutineUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.check_constraint_routine_usage</code>
|
||||||
|
*/
|
||||||
|
public static final CheckConstraintRoutineUsage CHECK_CONSTRAINT_ROUTINE_USAGE = new CheckConstraintRoutineUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<CheckConstraintRoutineUsageRecord> getRecordType() {
|
||||||
|
return CheckConstraintRoutineUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraint_routine_usage.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintRoutineUsageRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraint_routine_usage.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintRoutineUsageRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraint_routine_usage.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintRoutineUsageRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraint_routine_usage.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintRoutineUsageRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraint_routine_usage.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintRoutineUsageRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraint_routine_usage.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintRoutineUsageRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private CheckConstraintRoutineUsage(Name alias, Table<CheckConstraintRoutineUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CheckConstraintRoutineUsage(Name alias, Table<CheckConstraintRoutineUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "check_constraint_routine_usage" as SELECT DISTINCT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(c.conname)::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name
|
||||||
|
FROM pg_namespace nc,
|
||||||
|
pg_constraint c,
|
||||||
|
pg_depend d,
|
||||||
|
pg_proc p,
|
||||||
|
pg_namespace np
|
||||||
|
WHERE ((nc.oid = c.connamespace) AND (c.contype = 'c'::"char") AND (c.oid = d.objid) AND (d.classid = ('pg_constraint'::regclass)::oid) AND (d.refobjid = p.oid) AND (d.refclassid = ('pg_proc'::regclass)::oid) AND (p.pronamespace = np.oid) AND pg_has_role(p.proowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.check_constraint_routine_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CheckConstraintRoutineUsage(String alias) {
|
||||||
|
this(DSL.name(alias), CHECK_CONSTRAINT_ROUTINE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.check_constraint_routine_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CheckConstraintRoutineUsage(Name alias) {
|
||||||
|
this(alias, CHECK_CONSTRAINT_ROUTINE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.check_constraint_routine_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public CheckConstraintRoutineUsage() {
|
||||||
|
this(DSL.name("check_constraint_routine_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage as(String alias) {
|
||||||
|
return new CheckConstraintRoutineUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage as(Name alias) {
|
||||||
|
return new CheckConstraintRoutineUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage as(Table<?> alias) {
|
||||||
|
return new CheckConstraintRoutineUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage rename(String name) {
|
||||||
|
return new CheckConstraintRoutineUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage rename(Name name) {
|
||||||
|
return new CheckConstraintRoutineUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage rename(Table<?> name) {
|
||||||
|
return new CheckConstraintRoutineUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage where(Condition condition) {
|
||||||
|
return new CheckConstraintRoutineUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraintRoutineUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraintRoutineUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraintRoutineUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraintRoutineUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraintRoutineUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.CheckConstraintsRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class CheckConstraints extends TableImpl<CheckConstraintsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.check_constraints</code>
|
||||||
|
*/
|
||||||
|
public static final CheckConstraints CHECK_CONSTRAINTS = new CheckConstraints();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<CheckConstraintsRecord> getRecordType() {
|
||||||
|
return CheckConstraintsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraints.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintsRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraints.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintsRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraints.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintsRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.check_constraints.check_clause</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CheckConstraintsRecord, String> CHECK_CLAUSE = createField(DSL.name("check_clause"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private CheckConstraints(Name alias, Table<CheckConstraintsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CheckConstraints(Name alias, Table<CheckConstraintsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "check_constraints" as SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(rs.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(con.conname)::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(SUBSTRING(pg_get_constraintdef(con.oid) FROM 7))::information_schema.character_data AS check_clause
|
||||||
|
FROM (((pg_constraint con
|
||||||
|
LEFT JOIN pg_namespace rs ON ((rs.oid = con.connamespace)))
|
||||||
|
LEFT JOIN pg_class c ON ((c.oid = con.conrelid)))
|
||||||
|
LEFT JOIN pg_type t ON ((t.oid = con.contypid)))
|
||||||
|
WHERE (pg_has_role(COALESCE(c.relowner, t.typowner), 'USAGE'::text) AND (con.contype = 'c'::"char"))
|
||||||
|
UNION
|
||||||
|
SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(((((((n.oid)::text || '_'::text) || (r.oid)::text) || '_'::text) || (a.attnum)::text) || '_not_null'::text))::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(((a.attname)::text || ' IS NOT NULL'::text))::information_schema.character_data AS check_clause
|
||||||
|
FROM pg_namespace n,
|
||||||
|
pg_class r,
|
||||||
|
pg_attribute a
|
||||||
|
WHERE ((n.oid = r.relnamespace) AND (r.oid = a.attrelid) AND (a.attnum > 0) AND (NOT a.attisdropped) AND a.attnotnull AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND pg_has_role(r.relowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.check_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CheckConstraints(String alias) {
|
||||||
|
this(DSL.name(alias), CHECK_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.check_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CheckConstraints(Name alias) {
|
||||||
|
this(alias, CHECK_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.check_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public CheckConstraints() {
|
||||||
|
this(DSL.name("check_constraints"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckConstraints as(String alias) {
|
||||||
|
return new CheckConstraints(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckConstraints as(Name alias) {
|
||||||
|
return new CheckConstraints(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CheckConstraints as(Table<?> alias) {
|
||||||
|
return new CheckConstraints(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints rename(String name) {
|
||||||
|
return new CheckConstraints(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints rename(Name name) {
|
||||||
|
return new CheckConstraints(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints rename(Table<?> name) {
|
||||||
|
return new CheckConstraints(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints where(Condition condition) {
|
||||||
|
return new CheckConstraints(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraints where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraints where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraints where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CheckConstraints where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CheckConstraints whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.CollationCharacterSetApplicabilityRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class CollationCharacterSetApplicability extends TableImpl<CollationCharacterSetApplicabilityRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.collation_character_set_applicability</code>
|
||||||
|
*/
|
||||||
|
public static final CollationCharacterSetApplicability COLLATION_CHARACTER_SET_APPLICABILITY = new CollationCharacterSetApplicability();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<CollationCharacterSetApplicabilityRecord> getRecordType() {
|
||||||
|
return CollationCharacterSetApplicabilityRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.collation_character_set_applicability.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationCharacterSetApplicabilityRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.collation_character_set_applicability.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationCharacterSetApplicabilityRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.collation_character_set_applicability.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationCharacterSetApplicabilityRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.collation_character_set_applicability.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationCharacterSetApplicabilityRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.collation_character_set_applicability.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationCharacterSetApplicabilityRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.collation_character_set_applicability.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationCharacterSetApplicabilityRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private CollationCharacterSetApplicability(Name alias, Table<CollationCharacterSetApplicabilityRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CollationCharacterSetApplicability(Name alias, Table<CollationCharacterSetApplicabilityRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "collation_character_set_applicability" as SELECT (current_database())::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(c.collname)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(getdatabaseencoding())::information_schema.sql_identifier AS character_set_name
|
||||||
|
FROM pg_collation c,
|
||||||
|
pg_namespace nc
|
||||||
|
WHERE ((c.collnamespace = nc.oid) AND (c.collencoding = ANY (ARRAY['-1'::integer, ( SELECT pg_database.encoding
|
||||||
|
FROM pg_database
|
||||||
|
WHERE (pg_database.datname = current_database()))])));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.collation_character_set_applicability</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public CollationCharacterSetApplicability(String alias) {
|
||||||
|
this(DSL.name(alias), COLLATION_CHARACTER_SET_APPLICABILITY);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.collation_character_set_applicability</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public CollationCharacterSetApplicability(Name alias) {
|
||||||
|
this(alias, COLLATION_CHARACTER_SET_APPLICABILITY);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a
|
||||||
|
* <code>information_schema.collation_character_set_applicability</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public CollationCharacterSetApplicability() {
|
||||||
|
this(DSL.name("collation_character_set_applicability"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability as(String alias) {
|
||||||
|
return new CollationCharacterSetApplicability(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability as(Name alias) {
|
||||||
|
return new CollationCharacterSetApplicability(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability as(Table<?> alias) {
|
||||||
|
return new CollationCharacterSetApplicability(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability rename(String name) {
|
||||||
|
return new CollationCharacterSetApplicability(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability rename(Name name) {
|
||||||
|
return new CollationCharacterSetApplicability(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability rename(Table<?> name) {
|
||||||
|
return new CollationCharacterSetApplicability(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability where(Condition condition) {
|
||||||
|
return new CollationCharacterSetApplicability(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CollationCharacterSetApplicability where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CollationCharacterSetApplicability where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CollationCharacterSetApplicability where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public CollationCharacterSetApplicability where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CollationCharacterSetApplicability whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.CollationsRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Collations extends TableImpl<CollationsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.collations</code>
|
||||||
|
*/
|
||||||
|
public static final Collations COLLATIONS = new Collations();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<CollationsRecord> getRecordType() {
|
||||||
|
return CollationsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.collations.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationsRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.collations.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationsRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.collations.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationsRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.collations.pad_attribute</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<CollationsRecord, String> PAD_ATTRIBUTE = createField(DSL.name("pad_attribute"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Collations(Name alias, Table<CollationsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Collations(Name alias, Table<CollationsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "collations" as SELECT (current_database())::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(c.collname)::information_schema.sql_identifier AS collation_name,
|
||||||
|
('NO PAD'::character varying)::information_schema.character_data AS pad_attribute
|
||||||
|
FROM pg_collation c,
|
||||||
|
pg_namespace nc
|
||||||
|
WHERE ((c.collnamespace = nc.oid) AND (c.collencoding = ANY (ARRAY['-1'::integer, ( SELECT pg_database.encoding
|
||||||
|
FROM pg_database
|
||||||
|
WHERE (pg_database.datname = current_database()))])));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.collations</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Collations(String alias) {
|
||||||
|
this(DSL.name(alias), COLLATIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.collations</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Collations(Name alias) {
|
||||||
|
this(alias, COLLATIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.collations</code> table reference
|
||||||
|
*/
|
||||||
|
public Collations() {
|
||||||
|
this(DSL.name("collations"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collations as(String alias) {
|
||||||
|
return new Collations(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collations as(Name alias) {
|
||||||
|
return new Collations(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collations as(Table<?> alias) {
|
||||||
|
return new Collations(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations rename(String name) {
|
||||||
|
return new Collations(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations rename(Name name) {
|
||||||
|
return new Collations(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations rename(Table<?> name) {
|
||||||
|
return new Collations(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations where(Condition condition) {
|
||||||
|
return new Collations(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Collations where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Collations where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Collations where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Collations where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Collations whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ColumnColumnUsageRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ColumnColumnUsage extends TableImpl<ColumnColumnUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.column_column_usage</code>
|
||||||
|
*/
|
||||||
|
public static final ColumnColumnUsage COLUMN_COLUMN_USAGE = new ColumnColumnUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ColumnColumnUsageRecord> getRecordType() {
|
||||||
|
return ColumnColumnUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_column_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnColumnUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_column_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnColumnUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_column_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnColumnUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_column_usage.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnColumnUsageRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_column_usage.dependent_column</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnColumnUsageRecord, String> DEPENDENT_COLUMN = createField(DSL.name("dependent_column"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ColumnColumnUsage(Name alias, Table<ColumnColumnUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ColumnColumnUsage(Name alias, Table<ColumnColumnUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "column_column_usage" as SELECT DISTINCT (current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(ac.attname)::information_schema.sql_identifier AS column_name,
|
||||||
|
(ad.attname)::information_schema.sql_identifier AS dependent_column
|
||||||
|
FROM pg_namespace n,
|
||||||
|
pg_class c,
|
||||||
|
pg_depend d,
|
||||||
|
pg_attribute ac,
|
||||||
|
pg_attribute ad,
|
||||||
|
pg_attrdef atd
|
||||||
|
WHERE ((n.oid = c.relnamespace) AND (c.oid = ac.attrelid) AND (c.oid = ad.attrelid) AND (ac.attnum <> ad.attnum) AND (ad.attrelid = atd.adrelid) AND (ad.attnum = atd.adnum) AND (d.classid = ('pg_attrdef'::regclass)::oid) AND (d.refclassid = ('pg_class'::regclass)::oid) AND (d.objid = atd.oid) AND (d.refobjid = ac.attrelid) AND (d.refobjsubid = ac.attnum) AND (ad.attgenerated <> ''::"char") AND pg_has_role(c.relowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_column_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ColumnColumnUsage(String alias) {
|
||||||
|
this(DSL.name(alias), COLUMN_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_column_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ColumnColumnUsage(Name alias) {
|
||||||
|
this(alias, COLUMN_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.column_column_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnColumnUsage() {
|
||||||
|
this(DSL.name("column_column_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage as(String alias) {
|
||||||
|
return new ColumnColumnUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage as(Name alias) {
|
||||||
|
return new ColumnColumnUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage as(Table<?> alias) {
|
||||||
|
return new ColumnColumnUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage rename(String name) {
|
||||||
|
return new ColumnColumnUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage rename(Name name) {
|
||||||
|
return new ColumnColumnUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage rename(Table<?> name) {
|
||||||
|
return new ColumnColumnUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage where(Condition condition) {
|
||||||
|
return new ColumnColumnUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnColumnUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnColumnUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnColumnUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnColumnUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnColumnUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,265 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ColumnDomainUsageRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ColumnDomainUsage extends TableImpl<ColumnDomainUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.column_domain_usage</code>
|
||||||
|
*/
|
||||||
|
public static final ColumnDomainUsage COLUMN_DOMAIN_USAGE = new ColumnDomainUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ColumnDomainUsageRecord> getRecordType() {
|
||||||
|
return ColumnDomainUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.domain_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.domain_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.domain_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> DOMAIN_NAME = createField(DSL.name("domain_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_domain_usage.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnDomainUsageRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ColumnDomainUsage(Name alias, Table<ColumnDomainUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ColumnDomainUsage(Name alias, Table<ColumnDomainUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "column_domain_usage" as SELECT (current_database())::information_schema.sql_identifier AS domain_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS domain_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS domain_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(a.attname)::information_schema.sql_identifier AS column_name
|
||||||
|
FROM pg_type t,
|
||||||
|
pg_namespace nt,
|
||||||
|
pg_class c,
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_attribute a
|
||||||
|
WHERE ((t.typnamespace = nt.oid) AND (c.relnamespace = nc.oid) AND (a.attrelid = c.oid) AND (a.atttypid = t.oid) AND (t.typtype = 'd'::"char") AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND (a.attnum > 0) AND (NOT a.attisdropped) AND pg_has_role(t.typowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_domain_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ColumnDomainUsage(String alias) {
|
||||||
|
this(DSL.name(alias), COLUMN_DOMAIN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_domain_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ColumnDomainUsage(Name alias) {
|
||||||
|
this(alias, COLUMN_DOMAIN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.column_domain_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnDomainUsage() {
|
||||||
|
this(DSL.name("column_domain_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage as(String alias) {
|
||||||
|
return new ColumnDomainUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage as(Name alias) {
|
||||||
|
return new ColumnDomainUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage as(Table<?> alias) {
|
||||||
|
return new ColumnDomainUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage rename(String name) {
|
||||||
|
return new ColumnDomainUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage rename(Name name) {
|
||||||
|
return new ColumnDomainUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage rename(Table<?> name) {
|
||||||
|
return new ColumnDomainUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage where(Condition condition) {
|
||||||
|
return new ColumnDomainUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnDomainUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnDomainUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnDomainUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnDomainUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnDomainUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ColumnOptionsRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ColumnOptions extends TableImpl<ColumnOptionsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.column_options</code>
|
||||||
|
*/
|
||||||
|
public static final ColumnOptions COLUMN_OPTIONS = new ColumnOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ColumnOptionsRecord> getRecordType() {
|
||||||
|
return ColumnOptionsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_options.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnOptionsRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_options.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnOptionsRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_options.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnOptionsRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_options.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnOptionsRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_options.option_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnOptionsRecord, String> OPTION_NAME = createField(DSL.name("option_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_options.option_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnOptionsRecord, String> OPTION_VALUE = createField(DSL.name("option_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ColumnOptions(Name alias, Table<ColumnOptionsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ColumnOptions(Name alias, Table<ColumnOptionsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "column_options" as SELECT (current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(c.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(c.attname)::information_schema.sql_identifier AS column_name,
|
||||||
|
((pg_options_to_table(c.attfdwoptions)).option_name)::information_schema.sql_identifier AS option_name,
|
||||||
|
((pg_options_to_table(c.attfdwoptions)).option_value)::information_schema.character_data AS option_value
|
||||||
|
FROM information_schema._pg_foreign_table_columns c;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_options</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnOptions(String alias) {
|
||||||
|
this(DSL.name(alias), COLUMN_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_options</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnOptions(Name alias) {
|
||||||
|
this(alias, COLUMN_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.column_options</code> table reference
|
||||||
|
*/
|
||||||
|
public ColumnOptions() {
|
||||||
|
this(DSL.name("column_options"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnOptions as(String alias) {
|
||||||
|
return new ColumnOptions(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnOptions as(Name alias) {
|
||||||
|
return new ColumnOptions(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnOptions as(Table<?> alias) {
|
||||||
|
return new ColumnOptions(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions rename(String name) {
|
||||||
|
return new ColumnOptions(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions rename(Name name) {
|
||||||
|
return new ColumnOptions(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions rename(Table<?> name) {
|
||||||
|
return new ColumnOptions(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions where(Condition condition) {
|
||||||
|
return new ColumnOptions(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnOptions where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnOptions where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnOptions where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnOptions where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnOptions whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,315 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ColumnPrivilegesRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ColumnPrivileges extends TableImpl<ColumnPrivilegesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.column_privileges</code>
|
||||||
|
*/
|
||||||
|
public static final ColumnPrivileges COLUMN_PRIVILEGES = new ColumnPrivileges();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ColumnPrivilegesRecord> getRecordType() {
|
||||||
|
return ColumnPrivilegesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_privileges.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_privileges.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_privileges.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_privileges.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_privileges.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_privileges.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_privileges.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_privileges.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnPrivilegesRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ColumnPrivileges(Name alias, Table<ColumnPrivilegesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ColumnPrivileges(Name alias, Table<ColumnPrivilegesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "column_privileges" as SELECT (u_grantor.rolname)::information_schema.sql_identifier AS grantor,
|
||||||
|
(grantee.rolname)::information_schema.sql_identifier AS grantee,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(x.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(x.attname)::information_schema.sql_identifier AS column_name,
|
||||||
|
(x.prtype)::information_schema.character_data AS privilege_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (pg_has_role(x.grantee, x.relowner, 'USAGE'::text) OR x.grantable) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_grantable
|
||||||
|
FROM ( SELECT pr_c.grantor,
|
||||||
|
pr_c.grantee,
|
||||||
|
a.attname,
|
||||||
|
pr_c.relname,
|
||||||
|
pr_c.relnamespace,
|
||||||
|
pr_c.prtype,
|
||||||
|
pr_c.grantable,
|
||||||
|
pr_c.relowner
|
||||||
|
FROM ( SELECT pg_class.oid,
|
||||||
|
pg_class.relname,
|
||||||
|
pg_class.relnamespace,
|
||||||
|
pg_class.relowner,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).grantor AS grantor,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).grantee AS grantee,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).privilege_type AS privilege_type,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).is_grantable AS is_grantable
|
||||||
|
FROM pg_class
|
||||||
|
WHERE (pg_class.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"]))) pr_c(oid, relname, relnamespace, relowner, grantor, grantee, prtype, grantable),
|
||||||
|
pg_attribute a
|
||||||
|
WHERE ((a.attrelid = pr_c.oid) AND (a.attnum > 0) AND (NOT a.attisdropped))
|
||||||
|
UNION
|
||||||
|
SELECT pr_a.grantor,
|
||||||
|
pr_a.grantee,
|
||||||
|
pr_a.attname,
|
||||||
|
c.relname,
|
||||||
|
c.relnamespace,
|
||||||
|
pr_a.prtype,
|
||||||
|
pr_a.grantable,
|
||||||
|
c.relowner
|
||||||
|
FROM ( SELECT a.attrelid,
|
||||||
|
a.attname,
|
||||||
|
(aclexplode(COALESCE(a.attacl, acldefault('c'::"char", cc.relowner)))).grantor AS grantor,
|
||||||
|
(aclexplode(COALESCE(a.attacl, acldefault('c'::"char", cc.relowner)))).grantee AS grantee,
|
||||||
|
(aclexplode(COALESCE(a.attacl, acldefault('c'::"char", cc.relowner)))).privilege_type AS privilege_type,
|
||||||
|
(aclexplode(COALESCE(a.attacl, acldefault('c'::"char", cc.relowner)))).is_grantable AS is_grantable
|
||||||
|
FROM (pg_attribute a
|
||||||
|
JOIN pg_class cc ON ((a.attrelid = cc.oid)))
|
||||||
|
WHERE ((a.attnum > 0) AND (NOT a.attisdropped))) pr_a(attrelid, attname, grantor, grantee, prtype, grantable),
|
||||||
|
pg_class c
|
||||||
|
WHERE ((pr_a.attrelid = c.oid) AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])))) x,
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_authid u_grantor,
|
||||||
|
( SELECT pg_authid.oid,
|
||||||
|
pg_authid.rolname
|
||||||
|
FROM pg_authid
|
||||||
|
UNION ALL
|
||||||
|
SELECT (0)::oid AS oid,
|
||||||
|
'PUBLIC'::name) grantee(oid, rolname)
|
||||||
|
WHERE ((x.relnamespace = nc.oid) AND (x.grantee = grantee.oid) AND (x.grantor = u_grantor.oid) AND (x.prtype = ANY (ARRAY['INSERT'::text, 'SELECT'::text, 'UPDATE'::text, 'REFERENCES'::text])) AND (pg_has_role(u_grantor.oid, 'USAGE'::text) OR pg_has_role(grantee.oid, 'USAGE'::text) OR (grantee.rolname = 'PUBLIC'::name)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnPrivileges(String alias) {
|
||||||
|
this(DSL.name(alias), COLUMN_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnPrivileges(Name alias) {
|
||||||
|
this(alias, COLUMN_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.column_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnPrivileges() {
|
||||||
|
this(DSL.name("column_privileges"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges as(String alias) {
|
||||||
|
return new ColumnPrivileges(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges as(Name alias) {
|
||||||
|
return new ColumnPrivileges(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges as(Table<?> alias) {
|
||||||
|
return new ColumnPrivileges(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges rename(String name) {
|
||||||
|
return new ColumnPrivileges(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges rename(Name name) {
|
||||||
|
return new ColumnPrivileges(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges rename(Table<?> name) {
|
||||||
|
return new ColumnPrivileges(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges where(Condition condition) {
|
||||||
|
return new ColumnPrivileges(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnPrivileges where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnPrivileges where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnPrivileges where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnPrivileges where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnPrivileges whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,260 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ColumnUdtUsageRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ColumnUdtUsage extends TableImpl<ColumnUdtUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.column_udt_usage</code>
|
||||||
|
*/
|
||||||
|
public static final ColumnUdtUsage COLUMN_UDT_USAGE = new ColumnUdtUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ColumnUdtUsageRecord> getRecordType() {
|
||||||
|
return ColumnUdtUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_udt_usage.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_udt_usage.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_udt_usage.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.column_udt_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_udt_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_udt_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.column_udt_usage.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnUdtUsageRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ColumnUdtUsage(Name alias, Table<ColumnUdtUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ColumnUdtUsage(Name alias, Table<ColumnUdtUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "column_udt_usage" as SELECT (current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(COALESCE(nbt.nspname, nt.nspname))::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(COALESCE(bt.typname, t.typname))::information_schema.sql_identifier AS udt_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(a.attname)::information_schema.sql_identifier AS column_name
|
||||||
|
FROM pg_attribute a,
|
||||||
|
pg_class c,
|
||||||
|
pg_namespace nc,
|
||||||
|
((pg_type t
|
||||||
|
JOIN pg_namespace nt ON ((t.typnamespace = nt.oid)))
|
||||||
|
LEFT JOIN (pg_type bt
|
||||||
|
JOIN pg_namespace nbt ON ((bt.typnamespace = nbt.oid))) ON (((t.typtype = 'd'::"char") AND (t.typbasetype = bt.oid))))
|
||||||
|
WHERE ((a.attrelid = c.oid) AND (a.atttypid = t.oid) AND (nc.oid = c.relnamespace) AND (a.attnum > 0) AND (NOT a.attisdropped) AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND pg_has_role(COALESCE(bt.typowner, t.typowner), 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_udt_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnUdtUsage(String alias) {
|
||||||
|
this(DSL.name(alias), COLUMN_UDT_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.column_udt_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ColumnUdtUsage(Name alias) {
|
||||||
|
this(alias, COLUMN_UDT_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.column_udt_usage</code> table reference
|
||||||
|
*/
|
||||||
|
public ColumnUdtUsage() {
|
||||||
|
this(DSL.name("column_udt_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage as(String alias) {
|
||||||
|
return new ColumnUdtUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage as(Name alias) {
|
||||||
|
return new ColumnUdtUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage as(Table<?> alias) {
|
||||||
|
return new ColumnUdtUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage rename(String name) {
|
||||||
|
return new ColumnUdtUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage rename(Name name) {
|
||||||
|
return new ColumnUdtUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage rename(Table<?> name) {
|
||||||
|
return new ColumnUdtUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage where(Condition condition) {
|
||||||
|
return new ColumnUdtUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnUdtUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnUdtUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnUdtUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ColumnUdtUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ColumnUdtUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,549 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ColumnsRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Columns extends TableImpl<ColumnsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.columns</code>
|
||||||
|
*/
|
||||||
|
public static final Columns COLUMNS = new Columns();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ColumnsRecord> getRecordType() {
|
||||||
|
return ColumnsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.ordinal_position</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.column_default</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> COLUMN_DEFAULT = createField(DSL.name("column_default"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.is_nullable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IS_NULLABLE = createField(DSL.name("is_nullable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> DATA_TYPE = createField(DSL.name("data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.columns.character_maximum_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.columns.character_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.columns.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.domain_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.domain_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.domain_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> DOMAIN_NAME = createField(DSL.name("domain_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> SCOPE_NAME = createField(DSL.name("scope_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, Integer> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.is_self_referencing</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IS_SELF_REFERENCING = createField(DSL.name("is_self_referencing"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.is_identity</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IS_IDENTITY = createField(DSL.name("is_identity"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.identity_generation</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IDENTITY_GENERATION = createField(DSL.name("identity_generation"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.identity_start</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IDENTITY_START = createField(DSL.name("identity_start"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.identity_increment</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IDENTITY_INCREMENT = createField(DSL.name("identity_increment"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.identity_maximum</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IDENTITY_MAXIMUM = createField(DSL.name("identity_maximum"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.identity_minimum</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IDENTITY_MINIMUM = createField(DSL.name("identity_minimum"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.identity_cycle</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IDENTITY_CYCLE = createField(DSL.name("identity_cycle"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.is_generated</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IS_GENERATED = createField(DSL.name("is_generated"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.generation_expression</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> GENERATION_EXPRESSION = createField(DSL.name("generation_expression"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.columns.is_updatable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ColumnsRecord, String> IS_UPDATABLE = createField(DSL.name("is_updatable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Columns(Name alias, Table<ColumnsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Columns(Name alias, Table<ColumnsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "columns" as SELECT (current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(a.attname)::information_schema.sql_identifier AS column_name,
|
||||||
|
(a.attnum)::information_schema.cardinal_number AS ordinal_position,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (a.attgenerated = ''::"char") THEN pg_get_expr(ad.adbin, ad.adrelid)
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS column_default,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (a.attnotnull OR ((t.typtype = 'd'::"char") AND t.typnotnull)) THEN 'NO'::text
|
||||||
|
ELSE 'YES'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_nullable,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (t.typtype = 'd'::"char") THEN
|
||||||
|
CASE
|
||||||
|
WHEN ((bt.typelem <> (0)::oid) AND (bt.typlen = '-1'::integer)) THEN 'ARRAY'::text
|
||||||
|
WHEN (nbt.nspname = 'pg_catalog'::name) THEN format_type(t.typbasetype, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
WHEN ((t.typelem <> (0)::oid) AND (t.typlen = '-1'::integer)) THEN 'ARRAY'::text
|
||||||
|
WHEN (nt.nspname = 'pg_catalog'::name) THEN format_type(a.atttypid, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END
|
||||||
|
END)::information_schema.character_data AS data_type,
|
||||||
|
(information_schema._pg_char_max_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS character_maximum_length,
|
||||||
|
(information_schema._pg_char_octet_length(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS character_octet_length,
|
||||||
|
(information_schema._pg_numeric_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(information_schema._pg_numeric_precision_radix(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(information_schema._pg_numeric_scale(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(information_schema._pg_datetime_precision(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.cardinal_number AS datetime_precision,
|
||||||
|
(information_schema._pg_interval_type(information_schema._pg_truetypid(a.*, t.*), information_schema._pg_truetypmod(a.*, t.*)))::information_schema.character_data AS interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS interval_precision,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nco.nspname IS NOT NULL) THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(nco.nspname)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(co.collname)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (t.typtype = 'd'::"char") THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS domain_catalog,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (t.typtype = 'd'::"char") THEN nt.nspname
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS domain_schema,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (t.typtype = 'd'::"char") THEN t.typname
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS domain_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(COALESCE(nbt.nspname, nt.nspname))::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(COALESCE(bt.typname, t.typname))::information_schema.sql_identifier AS udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS maximum_cardinality,
|
||||||
|
(a.attnum)::information_schema.sql_identifier AS dtd_identifier,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS is_self_referencing,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (a.attidentity = ANY (ARRAY['a'::"char", 'd'::"char"])) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_identity,
|
||||||
|
(
|
||||||
|
CASE a.attidentity
|
||||||
|
WHEN 'a'::"char" THEN 'ALWAYS'::text
|
||||||
|
WHEN 'd'::"char" THEN 'BY DEFAULT'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS identity_generation,
|
||||||
|
(seq.seqstart)::information_schema.character_data AS identity_start,
|
||||||
|
(seq.seqincrement)::information_schema.character_data AS identity_increment,
|
||||||
|
(seq.seqmax)::information_schema.character_data AS identity_maximum,
|
||||||
|
(seq.seqmin)::information_schema.character_data AS identity_minimum,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN seq.seqcycle THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS identity_cycle,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (a.attgenerated <> ''::"char") THEN 'ALWAYS'::text
|
||||||
|
ELSE 'NEVER'::text
|
||||||
|
END)::information_schema.character_data AS is_generated,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (a.attgenerated <> ''::"char") THEN pg_get_expr(ad.adbin, ad.adrelid)
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS generation_expression,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN ((c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) OR ((c.relkind = ANY (ARRAY['v'::"char", 'f'::"char"])) AND pg_column_is_updatable((c.oid)::regclass, a.attnum, false))) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_updatable
|
||||||
|
FROM ((((((pg_attribute a
|
||||||
|
LEFT JOIN pg_attrdef ad ON (((a.attrelid = ad.adrelid) AND (a.attnum = ad.adnum))))
|
||||||
|
JOIN (pg_class c
|
||||||
|
JOIN pg_namespace nc ON ((c.relnamespace = nc.oid))) ON ((a.attrelid = c.oid)))
|
||||||
|
JOIN (pg_type t
|
||||||
|
JOIN pg_namespace nt ON ((t.typnamespace = nt.oid))) ON ((a.atttypid = t.oid)))
|
||||||
|
LEFT JOIN (pg_type bt
|
||||||
|
JOIN pg_namespace nbt ON ((bt.typnamespace = nbt.oid))) ON (((t.typtype = 'd'::"char") AND (t.typbasetype = bt.oid))))
|
||||||
|
LEFT JOIN (pg_collation co
|
||||||
|
JOIN pg_namespace nco ON ((co.collnamespace = nco.oid))) ON (((a.attcollation = co.oid) AND ((nco.nspname <> 'pg_catalog'::name) OR (co.collname <> 'default'::name)))))
|
||||||
|
LEFT JOIN (pg_depend dep
|
||||||
|
JOIN pg_sequence seq ON (((dep.classid = ('pg_class'::regclass)::oid) AND (dep.objid = seq.seqrelid) AND (dep.deptype = 'i'::"char")))) ON (((dep.refclassid = ('pg_class'::regclass)::oid) AND (dep.refobjid = c.oid) AND (dep.refobjsubid = a.attnum))))
|
||||||
|
WHERE ((NOT pg_is_other_temp_schema(nc.oid)) AND (a.attnum > 0) AND (NOT a.attisdropped) AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_column_privilege(c.oid, a.attnum, 'SELECT, INSERT, UPDATE, REFERENCES'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.columns</code> table reference
|
||||||
|
*/
|
||||||
|
public Columns(String alias) {
|
||||||
|
this(DSL.name(alias), COLUMNS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.columns</code> table reference
|
||||||
|
*/
|
||||||
|
public Columns(Name alias) {
|
||||||
|
this(alias, COLUMNS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.columns</code> table reference
|
||||||
|
*/
|
||||||
|
public Columns() {
|
||||||
|
this(DSL.name("columns"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Columns as(String alias) {
|
||||||
|
return new Columns(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Columns as(Name alias) {
|
||||||
|
return new Columns(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Columns as(Table<?> alias) {
|
||||||
|
return new Columns(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns rename(String name) {
|
||||||
|
return new Columns(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns rename(Name name) {
|
||||||
|
return new Columns(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns rename(Table<?> name) {
|
||||||
|
return new Columns(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns where(Condition condition) {
|
||||||
|
return new Columns(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Columns where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Columns where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Columns where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Columns where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Columns whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,294 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ConstraintColumnUsageRecord;
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ConstraintColumnUsage extends TableImpl<ConstraintColumnUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.constraint_column_usage</code>
|
||||||
|
*/
|
||||||
|
public static final ConstraintColumnUsage CONSTRAINT_COLUMN_USAGE = new ConstraintColumnUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ConstraintColumnUsageRecord> getRecordType() {
|
||||||
|
return ConstraintColumnUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_column_usage.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintColumnUsageRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ConstraintColumnUsage(Name alias, Table<ConstraintColumnUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ConstraintColumnUsage(Name alias, Table<ConstraintColumnUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "constraint_column_usage" as SELECT (current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(x.tblschema)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(x.tblname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(x.colname)::information_schema.sql_identifier AS column_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(x.cstrschema)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(x.cstrname)::information_schema.sql_identifier AS constraint_name
|
||||||
|
FROM ( SELECT DISTINCT nr.nspname,
|
||||||
|
r.relname,
|
||||||
|
r.relowner,
|
||||||
|
a.attname,
|
||||||
|
nc.nspname,
|
||||||
|
c.conname
|
||||||
|
FROM pg_namespace nr,
|
||||||
|
pg_class r,
|
||||||
|
pg_attribute a,
|
||||||
|
pg_depend d,
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_constraint c
|
||||||
|
WHERE ((nr.oid = r.relnamespace) AND (r.oid = a.attrelid) AND (d.refclassid = ('pg_class'::regclass)::oid) AND (d.refobjid = r.oid) AND (d.refobjsubid = a.attnum) AND (d.classid = ('pg_constraint'::regclass)::oid) AND (d.objid = c.oid) AND (c.connamespace = nc.oid) AND (c.contype = 'c'::"char") AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND (NOT a.attisdropped))
|
||||||
|
UNION ALL
|
||||||
|
SELECT nr.nspname,
|
||||||
|
r.relname,
|
||||||
|
r.relowner,
|
||||||
|
a.attname,
|
||||||
|
nc.nspname,
|
||||||
|
c.conname
|
||||||
|
FROM pg_namespace nr,
|
||||||
|
pg_class r,
|
||||||
|
pg_attribute a,
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_constraint c
|
||||||
|
WHERE ((nr.oid = r.relnamespace) AND (r.oid = a.attrelid) AND (nc.oid = c.connamespace) AND (r.oid =
|
||||||
|
CASE c.contype
|
||||||
|
WHEN 'f'::"char" THEN c.confrelid
|
||||||
|
ELSE c.conrelid
|
||||||
|
END) AND (a.attnum = ANY (
|
||||||
|
CASE c.contype
|
||||||
|
WHEN 'f'::"char" THEN c.confkey
|
||||||
|
ELSE c.conkey
|
||||||
|
END)) AND (NOT a.attisdropped) AND (c.contype = ANY (ARRAY['p'::"char", 'u'::"char", 'f'::"char"])) AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])))) x(tblschema, tblname, tblowner, colname, cstrschema, cstrname)
|
||||||
|
WHERE pg_has_role(x.tblowner, 'USAGE'::text);
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.constraint_column_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ConstraintColumnUsage(String alias) {
|
||||||
|
this(DSL.name(alias), CONSTRAINT_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.constraint_column_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ConstraintColumnUsage(Name alias) {
|
||||||
|
this(alias, CONSTRAINT_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.constraint_column_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ConstraintColumnUsage() {
|
||||||
|
this(DSL.name("constraint_column_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage as(String alias) {
|
||||||
|
return new ConstraintColumnUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage as(Name alias) {
|
||||||
|
return new ConstraintColumnUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage as(Table<?> alias) {
|
||||||
|
return new ConstraintColumnUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage rename(String name) {
|
||||||
|
return new ConstraintColumnUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage rename(Name name) {
|
||||||
|
return new ConstraintColumnUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage rename(Table<?> name) {
|
||||||
|
return new ConstraintColumnUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage where(Condition condition) {
|
||||||
|
return new ConstraintColumnUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintColumnUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintColumnUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintColumnUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintColumnUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintColumnUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ConstraintTableUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ConstraintTableUsage extends TableImpl<ConstraintTableUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.constraint_table_usage</code>
|
||||||
|
*/
|
||||||
|
public static final ConstraintTableUsage CONSTRAINT_TABLE_USAGE = new ConstraintTableUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ConstraintTableUsageRecord> getRecordType() {
|
||||||
|
return ConstraintTableUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_table_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintTableUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_table_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintTableUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_table_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintTableUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_table_usage.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintTableUsageRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_table_usage.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintTableUsageRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.constraint_table_usage.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ConstraintTableUsageRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ConstraintTableUsage(Name alias, Table<ConstraintTableUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ConstraintTableUsage(Name alias, Table<ConstraintTableUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "constraint_table_usage" as SELECT (current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nr.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(r.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(c.conname)::information_schema.sql_identifier AS constraint_name
|
||||||
|
FROM pg_constraint c,
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_class r,
|
||||||
|
pg_namespace nr
|
||||||
|
WHERE ((c.connamespace = nc.oid) AND (r.relnamespace = nr.oid) AND (((c.contype = 'f'::"char") AND (c.confrelid = r.oid)) OR ((c.contype = ANY (ARRAY['p'::"char", 'u'::"char"])) AND (c.conrelid = r.oid))) AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND pg_has_role(r.relowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.constraint_table_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ConstraintTableUsage(String alias) {
|
||||||
|
this(DSL.name(alias), CONSTRAINT_TABLE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.constraint_table_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ConstraintTableUsage(Name alias) {
|
||||||
|
this(alias, CONSTRAINT_TABLE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.constraint_table_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ConstraintTableUsage() {
|
||||||
|
this(DSL.name("constraint_table_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage as(String alias) {
|
||||||
|
return new ConstraintTableUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage as(Name alias) {
|
||||||
|
return new ConstraintTableUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage as(Table<?> alias) {
|
||||||
|
return new ConstraintTableUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage rename(String name) {
|
||||||
|
return new ConstraintTableUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage rename(Name name) {
|
||||||
|
return new ConstraintTableUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage rename(Table<?> name) {
|
||||||
|
return new ConstraintTableUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage where(Condition condition) {
|
||||||
|
return new ConstraintTableUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintTableUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintTableUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintTableUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ConstraintTableUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ConstraintTableUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,275 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.DataTypePrivilegesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class DataTypePrivileges extends TableImpl<DataTypePrivilegesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.data_type_privileges</code>
|
||||||
|
*/
|
||||||
|
public static final DataTypePrivileges DATA_TYPE_PRIVILEGES = new DataTypePrivileges();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<DataTypePrivilegesRecord> getRecordType() {
|
||||||
|
return DataTypePrivilegesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.data_type_privileges.object_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DataTypePrivilegesRecord, String> OBJECT_CATALOG = createField(DSL.name("object_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.data_type_privileges.object_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DataTypePrivilegesRecord, String> OBJECT_SCHEMA = createField(DSL.name("object_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.data_type_privileges.object_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DataTypePrivilegesRecord, String> OBJECT_NAME = createField(DSL.name("object_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.data_type_privileges.object_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DataTypePrivilegesRecord, String> OBJECT_TYPE = createField(DSL.name("object_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.data_type_privileges.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DataTypePrivilegesRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private DataTypePrivileges(Name alias, Table<DataTypePrivilegesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataTypePrivileges(Name alias, Table<DataTypePrivilegesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "data_type_privileges" as SELECT (current_database())::information_schema.sql_identifier AS object_catalog,
|
||||||
|
x.objschema AS object_schema,
|
||||||
|
x.objname AS object_name,
|
||||||
|
(x.objtype)::information_schema.character_data AS object_type,
|
||||||
|
x.objdtdid AS dtd_identifier
|
||||||
|
FROM ( SELECT attributes.udt_schema,
|
||||||
|
attributes.udt_name,
|
||||||
|
'USER-DEFINED TYPE'::text AS text,
|
||||||
|
attributes.dtd_identifier
|
||||||
|
FROM information_schema.attributes
|
||||||
|
UNION ALL
|
||||||
|
SELECT columns.table_schema,
|
||||||
|
columns.table_name,
|
||||||
|
'TABLE'::text AS text,
|
||||||
|
columns.dtd_identifier
|
||||||
|
FROM information_schema.columns
|
||||||
|
UNION ALL
|
||||||
|
SELECT domains.domain_schema,
|
||||||
|
domains.domain_name,
|
||||||
|
'DOMAIN'::text AS text,
|
||||||
|
domains.dtd_identifier
|
||||||
|
FROM information_schema.domains
|
||||||
|
UNION ALL
|
||||||
|
SELECT parameters.specific_schema,
|
||||||
|
parameters.specific_name,
|
||||||
|
'ROUTINE'::text AS text,
|
||||||
|
parameters.dtd_identifier
|
||||||
|
FROM information_schema.parameters
|
||||||
|
UNION ALL
|
||||||
|
SELECT routines.specific_schema,
|
||||||
|
routines.specific_name,
|
||||||
|
'ROUTINE'::text AS text,
|
||||||
|
routines.dtd_identifier
|
||||||
|
FROM information_schema.routines) x(objschema, objname, objtype, objdtdid);
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.data_type_privileges</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public DataTypePrivileges(String alias) {
|
||||||
|
this(DSL.name(alias), DATA_TYPE_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.data_type_privileges</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public DataTypePrivileges(Name alias) {
|
||||||
|
this(alias, DATA_TYPE_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.data_type_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public DataTypePrivileges() {
|
||||||
|
this(DSL.name("data_type_privileges"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges as(String alias) {
|
||||||
|
return new DataTypePrivileges(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges as(Name alias) {
|
||||||
|
return new DataTypePrivileges(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges as(Table<?> alias) {
|
||||||
|
return new DataTypePrivileges(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges rename(String name) {
|
||||||
|
return new DataTypePrivileges(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges rename(Name name) {
|
||||||
|
return new DataTypePrivileges(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges rename(Table<?> name) {
|
||||||
|
return new DataTypePrivileges(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges where(Condition condition) {
|
||||||
|
return new DataTypePrivileges(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DataTypePrivileges where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DataTypePrivileges where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DataTypePrivileges where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DataTypePrivileges where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DataTypePrivileges whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.DomainConstraintsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class DomainConstraints extends TableImpl<DomainConstraintsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.domain_constraints</code>
|
||||||
|
*/
|
||||||
|
public static final DomainConstraints DOMAIN_CONSTRAINTS = new DomainConstraints();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<DomainConstraintsRecord> getRecordType() {
|
||||||
|
return DomainConstraintsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.domain_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.domain_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.domain_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> DOMAIN_NAME = createField(DSL.name("domain_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.is_deferrable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> IS_DEFERRABLE = createField(DSL.name("is_deferrable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_constraints.initially_deferred</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainConstraintsRecord, String> INITIALLY_DEFERRED = createField(DSL.name("initially_deferred"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private DomainConstraints(Name alias, Table<DomainConstraintsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DomainConstraints(Name alias, Table<DomainConstraintsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "domain_constraints" as SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(rs.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(con.conname)::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS domain_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS domain_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS domain_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN con.condeferrable THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_deferrable,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN con.condeferred THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS initially_deferred
|
||||||
|
FROM pg_namespace rs,
|
||||||
|
pg_namespace n,
|
||||||
|
pg_constraint con,
|
||||||
|
pg_type t
|
||||||
|
WHERE ((rs.oid = con.connamespace) AND (n.oid = t.typnamespace) AND (t.oid = con.contypid) AND (pg_has_role(t.typowner, 'USAGE'::text) OR has_type_privilege(t.oid, 'USAGE'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.domain_constraints</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public DomainConstraints(String alias) {
|
||||||
|
this(DSL.name(alias), DOMAIN_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.domain_constraints</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public DomainConstraints(Name alias) {
|
||||||
|
this(alias, DOMAIN_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.domain_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public DomainConstraints() {
|
||||||
|
this(DSL.name("domain_constraints"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DomainConstraints as(String alias) {
|
||||||
|
return new DomainConstraints(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DomainConstraints as(Name alias) {
|
||||||
|
return new DomainConstraints(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DomainConstraints as(Table<?> alias) {
|
||||||
|
return new DomainConstraints(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints rename(String name) {
|
||||||
|
return new DomainConstraints(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints rename(Name name) {
|
||||||
|
return new DomainConstraints(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints rename(Table<?> name) {
|
||||||
|
return new DomainConstraints(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints where(Condition condition) {
|
||||||
|
return new DomainConstraints(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainConstraints where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainConstraints where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainConstraints where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainConstraints where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainConstraints whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.DomainUdtUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class DomainUdtUsage extends TableImpl<DomainUdtUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.domain_udt_usage</code>
|
||||||
|
*/
|
||||||
|
public static final DomainUdtUsage DOMAIN_UDT_USAGE = new DomainUdtUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<DomainUdtUsageRecord> getRecordType() {
|
||||||
|
return DomainUdtUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domain_udt_usage.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainUdtUsageRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domain_udt_usage.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainUdtUsageRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domain_udt_usage.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainUdtUsageRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_udt_usage.domain_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainUdtUsageRecord, String> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domain_udt_usage.domain_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainUdtUsageRecord, String> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domain_udt_usage.domain_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainUdtUsageRecord, String> DOMAIN_NAME = createField(DSL.name("domain_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private DomainUdtUsage(Name alias, Table<DomainUdtUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DomainUdtUsage(Name alias, Table<DomainUdtUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "domain_udt_usage" as SELECT (current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(nbt.nspname)::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(bt.typname)::information_schema.sql_identifier AS udt_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS domain_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS domain_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS domain_name
|
||||||
|
FROM pg_type t,
|
||||||
|
pg_namespace nt,
|
||||||
|
pg_type bt,
|
||||||
|
pg_namespace nbt
|
||||||
|
WHERE ((t.typnamespace = nt.oid) AND (t.typbasetype = bt.oid) AND (bt.typnamespace = nbt.oid) AND (t.typtype = 'd'::"char") AND pg_has_role(bt.typowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.domain_udt_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public DomainUdtUsage(String alias) {
|
||||||
|
this(DSL.name(alias), DOMAIN_UDT_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.domain_udt_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public DomainUdtUsage(Name alias) {
|
||||||
|
this(alias, DOMAIN_UDT_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.domain_udt_usage</code> table reference
|
||||||
|
*/
|
||||||
|
public DomainUdtUsage() {
|
||||||
|
this(DSL.name("domain_udt_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage as(String alias) {
|
||||||
|
return new DomainUdtUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage as(Name alias) {
|
||||||
|
return new DomainUdtUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage as(Table<?> alias) {
|
||||||
|
return new DomainUdtUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage rename(String name) {
|
||||||
|
return new DomainUdtUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage rename(Name name) {
|
||||||
|
return new DomainUdtUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage rename(Table<?> name) {
|
||||||
|
return new DomainUdtUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage where(Condition condition) {
|
||||||
|
return new DomainUdtUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainUdtUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainUdtUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainUdtUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public DomainUdtUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public DomainUdtUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,387 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.DomainsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Domains extends TableImpl<DomainsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.domains</code>
|
||||||
|
*/
|
||||||
|
public static final Domains DOMAINS = new Domains();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<DomainsRecord> getRecordType() {
|
||||||
|
return DomainsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.domain_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.domain_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.domain_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> DOMAIN_NAME = createField(DSL.name("domain_name"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> DATA_TYPE = createField(DSL.name("data_type"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domains.character_maximum_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domains.character_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.domains.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.domain_default</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> DOMAIN_DEFAULT = createField(DSL.name("domain_default"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> UDT_NAME = createField(DSL.name("udt_name"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> SCOPE_NAME = createField(DSL.name("scope_name"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, Integer> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.domains.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<DomainsRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), dev.struchkov.network.data.jooq.schema.information_schema.Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Domains(Name alias, Table<DomainsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Domains(Name alias, Table<DomainsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "domains" as SELECT (current_database())::information_schema.sql_identifier AS domain_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS domain_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS domain_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN ((t.typelem <> (0)::oid) AND (t.typlen = '-1'::integer)) THEN 'ARRAY'::text
|
||||||
|
WHEN (nbt.nspname = 'pg_catalog'::name) THEN format_type(t.typbasetype, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END)::information_schema.character_data AS data_type,
|
||||||
|
(information_schema._pg_char_max_length(t.typbasetype, t.typtypmod))::information_schema.cardinal_number AS character_maximum_length,
|
||||||
|
(information_schema._pg_char_octet_length(t.typbasetype, t.typtypmod))::information_schema.cardinal_number AS character_octet_length,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nco.nspname IS NOT NULL) THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(nco.nspname)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(co.collname)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(information_schema._pg_numeric_precision(t.typbasetype, t.typtypmod))::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(information_schema._pg_numeric_precision_radix(t.typbasetype, t.typtypmod))::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(information_schema._pg_numeric_scale(t.typbasetype, t.typtypmod))::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(information_schema._pg_datetime_precision(t.typbasetype, t.typtypmod))::information_schema.cardinal_number AS datetime_precision,
|
||||||
|
(information_schema._pg_interval_type(t.typbasetype, t.typtypmod))::information_schema.character_data AS interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS interval_precision,
|
||||||
|
(t.typdefault)::information_schema.character_data AS domain_default,
|
||||||
|
(current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(nbt.nspname)::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(bt.typname)::information_schema.sql_identifier AS udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS maximum_cardinality,
|
||||||
|
(1)::information_schema.sql_identifier AS dtd_identifier
|
||||||
|
FROM (((pg_type t
|
||||||
|
JOIN pg_namespace nt ON ((t.typnamespace = nt.oid)))
|
||||||
|
JOIN (pg_type bt
|
||||||
|
JOIN pg_namespace nbt ON ((bt.typnamespace = nbt.oid))) ON (((t.typbasetype = bt.oid) AND (t.typtype = 'd'::"char"))))
|
||||||
|
LEFT JOIN (pg_collation co
|
||||||
|
JOIN pg_namespace nco ON ((co.collnamespace = nco.oid))) ON (((t.typcollation = co.oid) AND ((nco.nspname <> 'pg_catalog'::name) OR (co.collname <> 'default'::name)))))
|
||||||
|
WHERE (pg_has_role(t.typowner, 'USAGE'::text) OR has_type_privilege(t.oid, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.domains</code> table reference
|
||||||
|
*/
|
||||||
|
public Domains(String alias) {
|
||||||
|
this(DSL.name(alias), DOMAINS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.domains</code> table reference
|
||||||
|
*/
|
||||||
|
public Domains(Name alias) {
|
||||||
|
this(alias, DOMAINS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.domains</code> table reference
|
||||||
|
*/
|
||||||
|
public Domains() {
|
||||||
|
this(DSL.name("domains"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Domains as(String alias) {
|
||||||
|
return new Domains(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Domains as(Name alias) {
|
||||||
|
return new Domains(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Domains as(Table<?> alias) {
|
||||||
|
return new Domains(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains rename(String name) {
|
||||||
|
return new Domains(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains rename(Name name) {
|
||||||
|
return new Domains(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains rename(Table<?> name) {
|
||||||
|
return new Domains(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains where(Condition condition) {
|
||||||
|
return new Domains(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Domains where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Domains where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Domains where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Domains where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Domains whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,456 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ElementTypesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ElementTypes extends TableImpl<ElementTypesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.element_types</code>
|
||||||
|
*/
|
||||||
|
public static final ElementTypes ELEMENT_TYPES = new ElementTypes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ElementTypesRecord> getRecordType() {
|
||||||
|
return ElementTypesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.object_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> OBJECT_CATALOG = createField(DSL.name("object_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.object_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> OBJECT_SCHEMA = createField(DSL.name("object_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.object_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> OBJECT_NAME = createField(DSL.name("object_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.object_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> OBJECT_TYPE = createField(DSL.name("object_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.collection_type_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> COLLECTION_TYPE_IDENTIFIER = createField(DSL.name("collection_type_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> DATA_TYPE = createField(DSL.name("data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.character_maximum_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.character_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.domain_default</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> DOMAIN_DEFAULT = createField(DSL.name("domain_default"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> SCOPE_NAME = createField(DSL.name("scope_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.element_types.maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, Integer> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.element_types.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ElementTypesRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ElementTypes(Name alias, Table<ElementTypesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ElementTypes(Name alias, Table<ElementTypesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "element_types" as SELECT (current_database())::information_schema.sql_identifier AS object_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS object_schema,
|
||||||
|
x.objname AS object_name,
|
||||||
|
(x.objtype)::information_schema.character_data AS object_type,
|
||||||
|
(x.objdtdid)::information_schema.sql_identifier AS collection_type_identifier,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nbt.nspname = 'pg_catalog'::name) THEN format_type(bt.oid, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END)::information_schema.character_data AS data_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS character_maximum_length,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS character_octet_length,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nco.nspname IS NOT NULL) THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(nco.nspname)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(co.collname)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS datetime_precision,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS interval_precision,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS domain_default,
|
||||||
|
(current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(nbt.nspname)::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(bt.typname)::information_schema.sql_identifier AS udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS maximum_cardinality,
|
||||||
|
(('a'::text || (x.objdtdid)::text))::information_schema.sql_identifier AS dtd_identifier
|
||||||
|
FROM pg_namespace n,
|
||||||
|
pg_type at,
|
||||||
|
pg_namespace nbt,
|
||||||
|
pg_type bt,
|
||||||
|
(( SELECT c.relnamespace,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS relname,
|
||||||
|
CASE
|
||||||
|
WHEN (c.relkind = 'c'::"char") THEN 'USER-DEFINED TYPE'::text
|
||||||
|
ELSE 'TABLE'::text
|
||||||
|
END AS "case",
|
||||||
|
a.attnum,
|
||||||
|
a.atttypid,
|
||||||
|
a.attcollation
|
||||||
|
FROM pg_class c,
|
||||||
|
pg_attribute a
|
||||||
|
WHERE ((c.oid = a.attrelid) AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'c'::"char", 'p'::"char"])) AND (a.attnum > 0) AND (NOT a.attisdropped))
|
||||||
|
UNION ALL
|
||||||
|
SELECT t.typnamespace,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS typname,
|
||||||
|
'DOMAIN'::text AS text,
|
||||||
|
1,
|
||||||
|
t.typbasetype,
|
||||||
|
t.typcollation
|
||||||
|
FROM pg_type t
|
||||||
|
WHERE (t.typtype = 'd'::"char")
|
||||||
|
UNION ALL
|
||||||
|
SELECT ss.pronamespace,
|
||||||
|
(nameconcatoid(ss.proname, ss.oid))::information_schema.sql_identifier AS nameconcatoid,
|
||||||
|
'ROUTINE'::text AS text,
|
||||||
|
(ss.x).n AS n,
|
||||||
|
(ss.x).x AS x,
|
||||||
|
0
|
||||||
|
FROM ( SELECT p.pronamespace,
|
||||||
|
p.proname,
|
||||||
|
p.oid,
|
||||||
|
information_schema._pg_expandarray(COALESCE(p.proallargtypes, (p.proargtypes)::oid[])) AS x
|
||||||
|
FROM pg_proc p) ss
|
||||||
|
UNION ALL
|
||||||
|
SELECT p.pronamespace,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS nameconcatoid,
|
||||||
|
'ROUTINE'::text AS text,
|
||||||
|
0,
|
||||||
|
p.prorettype,
|
||||||
|
0
|
||||||
|
FROM pg_proc p) x(objschema, objname, objtype, objdtdid, objtypeid, objcollation)
|
||||||
|
LEFT JOIN (pg_collation co
|
||||||
|
JOIN pg_namespace nco ON ((co.collnamespace = nco.oid))) ON (((x.objcollation = co.oid) AND ((nco.nspname <> 'pg_catalog'::name) OR (co.collname <> 'default'::name)))))
|
||||||
|
WHERE ((n.oid = x.objschema) AND (at.oid = x.objtypeid) AND ((at.typelem <> (0)::oid) AND (at.typlen = '-1'::integer)) AND (at.typelem = bt.oid) AND (nbt.oid = bt.typnamespace) AND ((n.nspname, (x.objname)::name, x.objtype, ((x.objdtdid)::information_schema.sql_identifier)::name) IN ( SELECT data_type_privileges.object_schema,
|
||||||
|
data_type_privileges.object_name,
|
||||||
|
data_type_privileges.object_type,
|
||||||
|
data_type_privileges.dtd_identifier
|
||||||
|
FROM information_schema.data_type_privileges)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.element_types</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ElementTypes(String alias) {
|
||||||
|
this(DSL.name(alias), ELEMENT_TYPES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.element_types</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ElementTypes(Name alias) {
|
||||||
|
this(alias, ELEMENT_TYPES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.element_types</code> table reference
|
||||||
|
*/
|
||||||
|
public ElementTypes() {
|
||||||
|
this(DSL.name("element_types"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ElementTypes as(String alias) {
|
||||||
|
return new ElementTypes(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ElementTypes as(Name alias) {
|
||||||
|
return new ElementTypes(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ElementTypes as(Table<?> alias) {
|
||||||
|
return new ElementTypes(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes rename(String name) {
|
||||||
|
return new ElementTypes(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes rename(Name name) {
|
||||||
|
return new ElementTypes(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes rename(Table<?> name) {
|
||||||
|
return new ElementTypes(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes where(Condition condition) {
|
||||||
|
return new ElementTypes(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ElementTypes where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ElementTypes where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ElementTypes where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ElementTypes where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ElementTypes whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,217 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.EnabledRolesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class EnabledRoles extends TableImpl<EnabledRolesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.enabled_roles</code>
|
||||||
|
*/
|
||||||
|
public static final EnabledRoles ENABLED_ROLES = new EnabledRoles();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<EnabledRolesRecord> getRecordType() {
|
||||||
|
return EnabledRolesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.enabled_roles.role_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<EnabledRolesRecord, String> ROLE_NAME = createField(DSL.name("role_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private EnabledRoles(Name alias, Table<EnabledRolesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private EnabledRoles(Name alias, Table<EnabledRolesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "enabled_roles" as SELECT (a.rolname)::information_schema.sql_identifier AS role_name
|
||||||
|
FROM pg_authid a
|
||||||
|
WHERE pg_has_role(a.oid, 'USAGE'::text);
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.enabled_roles</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public EnabledRoles(String alias) {
|
||||||
|
this(DSL.name(alias), ENABLED_ROLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.enabled_roles</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public EnabledRoles(Name alias) {
|
||||||
|
this(alias, ENABLED_ROLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.enabled_roles</code> table reference
|
||||||
|
*/
|
||||||
|
public EnabledRoles() {
|
||||||
|
this(DSL.name("enabled_roles"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnabledRoles as(String alias) {
|
||||||
|
return new EnabledRoles(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnabledRoles as(Name alias) {
|
||||||
|
return new EnabledRoles(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnabledRoles as(Table<?> alias) {
|
||||||
|
return new EnabledRoles(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles rename(String name) {
|
||||||
|
return new EnabledRoles(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles rename(Name name) {
|
||||||
|
return new EnabledRoles(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles rename(Table<?> name) {
|
||||||
|
return new EnabledRoles(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles where(Condition condition) {
|
||||||
|
return new EnabledRoles(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public EnabledRoles where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public EnabledRoles where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public EnabledRoles where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public EnabledRoles where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public EnabledRoles whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,242 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ForeignDataWrapperOptionsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ForeignDataWrapperOptions extends TableImpl<ForeignDataWrapperOptionsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options</code>
|
||||||
|
*/
|
||||||
|
public static final ForeignDataWrapperOptions FOREIGN_DATA_WRAPPER_OPTIONS = new ForeignDataWrapperOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ForeignDataWrapperOptionsRecord> getRecordType() {
|
||||||
|
return ForeignDataWrapperOptionsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options.foreign_data_wrapper_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrapperOptionsRecord, String> FOREIGN_DATA_WRAPPER_CATALOG = createField(DSL.name("foreign_data_wrapper_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options.foreign_data_wrapper_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrapperOptionsRecord, String> FOREIGN_DATA_WRAPPER_NAME = createField(DSL.name("foreign_data_wrapper_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options.option_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrapperOptionsRecord, String> OPTION_NAME = createField(DSL.name("option_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options.option_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrapperOptionsRecord, String> OPTION_VALUE = createField(DSL.name("option_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ForeignDataWrapperOptions(Name alias, Table<ForeignDataWrapperOptionsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ForeignDataWrapperOptions(Name alias, Table<ForeignDataWrapperOptionsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "foreign_data_wrapper_options" as SELECT w.foreign_data_wrapper_catalog,
|
||||||
|
w.foreign_data_wrapper_name,
|
||||||
|
((pg_options_to_table(w.fdwoptions)).option_name)::information_schema.sql_identifier AS option_name,
|
||||||
|
((pg_options_to_table(w.fdwoptions)).option_value)::information_schema.character_data AS option_value
|
||||||
|
FROM information_schema._pg_foreign_data_wrappers w;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignDataWrapperOptions(String alias) {
|
||||||
|
this(DSL.name(alias), FOREIGN_DATA_WRAPPER_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.foreign_data_wrapper_options</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignDataWrapperOptions(Name alias) {
|
||||||
|
this(alias, FOREIGN_DATA_WRAPPER_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.foreign_data_wrapper_options</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignDataWrapperOptions() {
|
||||||
|
this(DSL.name("foreign_data_wrapper_options"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions as(String alias) {
|
||||||
|
return new ForeignDataWrapperOptions(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions as(Name alias) {
|
||||||
|
return new ForeignDataWrapperOptions(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions as(Table<?> alias) {
|
||||||
|
return new ForeignDataWrapperOptions(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions rename(String name) {
|
||||||
|
return new ForeignDataWrapperOptions(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions rename(Name name) {
|
||||||
|
return new ForeignDataWrapperOptions(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions rename(Table<?> name) {
|
||||||
|
return new ForeignDataWrapperOptions(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions where(Condition condition) {
|
||||||
|
return new ForeignDataWrapperOptions(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrapperOptions where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrapperOptions where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrapperOptions where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrapperOptions where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrapperOptions whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ForeignDataWrappersRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ForeignDataWrappers extends TableImpl<ForeignDataWrappersRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.foreign_data_wrappers</code>
|
||||||
|
*/
|
||||||
|
public static final ForeignDataWrappers FOREIGN_DATA_WRAPPERS = new ForeignDataWrappers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ForeignDataWrappersRecord> getRecordType() {
|
||||||
|
return ForeignDataWrappersRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrappers.foreign_data_wrapper_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrappersRecord, String> FOREIGN_DATA_WRAPPER_CATALOG = createField(DSL.name("foreign_data_wrapper_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrappers.foreign_data_wrapper_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrappersRecord, String> FOREIGN_DATA_WRAPPER_NAME = createField(DSL.name("foreign_data_wrapper_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrappers.authorization_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrappersRecord, String> AUTHORIZATION_IDENTIFIER = createField(DSL.name("authorization_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrappers.library_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrappersRecord, String> LIBRARY_NAME = createField(DSL.name("library_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_data_wrappers.foreign_data_wrapper_language</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignDataWrappersRecord, String> FOREIGN_DATA_WRAPPER_LANGUAGE = createField(DSL.name("foreign_data_wrapper_language"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ForeignDataWrappers(Name alias, Table<ForeignDataWrappersRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ForeignDataWrappers(Name alias, Table<ForeignDataWrappersRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "foreign_data_wrappers" as SELECT w.foreign_data_wrapper_catalog,
|
||||||
|
w.foreign_data_wrapper_name,
|
||||||
|
w.authorization_identifier,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS library_name,
|
||||||
|
w.foreign_data_wrapper_language
|
||||||
|
FROM information_schema._pg_foreign_data_wrappers w;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_data_wrappers</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignDataWrappers(String alias) {
|
||||||
|
this(DSL.name(alias), FOREIGN_DATA_WRAPPERS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_data_wrappers</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignDataWrappers(Name alias) {
|
||||||
|
this(alias, FOREIGN_DATA_WRAPPERS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.foreign_data_wrappers</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignDataWrappers() {
|
||||||
|
this(DSL.name("foreign_data_wrappers"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers as(String alias) {
|
||||||
|
return new ForeignDataWrappers(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers as(Name alias) {
|
||||||
|
return new ForeignDataWrappers(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers as(Table<?> alias) {
|
||||||
|
return new ForeignDataWrappers(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers rename(String name) {
|
||||||
|
return new ForeignDataWrappers(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers rename(Name name) {
|
||||||
|
return new ForeignDataWrappers(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers rename(Table<?> name) {
|
||||||
|
return new ForeignDataWrappers(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers where(Condition condition) {
|
||||||
|
return new ForeignDataWrappers(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrappers where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrappers where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrappers where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignDataWrappers where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignDataWrappers whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ForeignServerOptionsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ForeignServerOptions extends TableImpl<ForeignServerOptionsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.foreign_server_options</code>
|
||||||
|
*/
|
||||||
|
public static final ForeignServerOptions FOREIGN_SERVER_OPTIONS = new ForeignServerOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ForeignServerOptionsRecord> getRecordType() {
|
||||||
|
return ForeignServerOptionsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_server_options.foreign_server_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServerOptionsRecord, String> FOREIGN_SERVER_CATALOG = createField(DSL.name("foreign_server_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_server_options.foreign_server_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServerOptionsRecord, String> FOREIGN_SERVER_NAME = createField(DSL.name("foreign_server_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_server_options.option_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServerOptionsRecord, String> OPTION_NAME = createField(DSL.name("option_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_server_options.option_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServerOptionsRecord, String> OPTION_VALUE = createField(DSL.name("option_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ForeignServerOptions(Name alias, Table<ForeignServerOptionsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ForeignServerOptions(Name alias, Table<ForeignServerOptionsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "foreign_server_options" as SELECT s.foreign_server_catalog,
|
||||||
|
s.foreign_server_name,
|
||||||
|
((pg_options_to_table(s.srvoptions)).option_name)::information_schema.sql_identifier AS option_name,
|
||||||
|
((pg_options_to_table(s.srvoptions)).option_value)::information_schema.character_data AS option_value
|
||||||
|
FROM information_schema._pg_foreign_servers s;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_server_options</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignServerOptions(String alias) {
|
||||||
|
this(DSL.name(alias), FOREIGN_SERVER_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_server_options</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignServerOptions(Name alias) {
|
||||||
|
this(alias, FOREIGN_SERVER_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.foreign_server_options</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignServerOptions() {
|
||||||
|
this(DSL.name("foreign_server_options"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions as(String alias) {
|
||||||
|
return new ForeignServerOptions(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions as(Name alias) {
|
||||||
|
return new ForeignServerOptions(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions as(Table<?> alias) {
|
||||||
|
return new ForeignServerOptions(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions rename(String name) {
|
||||||
|
return new ForeignServerOptions(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions rename(Name name) {
|
||||||
|
return new ForeignServerOptions(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions rename(Table<?> name) {
|
||||||
|
return new ForeignServerOptions(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions where(Condition condition) {
|
||||||
|
return new ForeignServerOptions(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServerOptions where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServerOptions where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServerOptions where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServerOptions where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServerOptions whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,259 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ForeignServersRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ForeignServers extends TableImpl<ForeignServersRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.foreign_servers</code>
|
||||||
|
*/
|
||||||
|
public static final ForeignServers FOREIGN_SERVERS = new ForeignServers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ForeignServersRecord> getRecordType() {
|
||||||
|
return ForeignServersRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.foreign_server_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> FOREIGN_SERVER_CATALOG = createField(DSL.name("foreign_server_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.foreign_server_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> FOREIGN_SERVER_NAME = createField(DSL.name("foreign_server_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.foreign_data_wrapper_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> FOREIGN_DATA_WRAPPER_CATALOG = createField(DSL.name("foreign_data_wrapper_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.foreign_data_wrapper_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> FOREIGN_DATA_WRAPPER_NAME = createField(DSL.name("foreign_data_wrapper_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.foreign_server_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> FOREIGN_SERVER_TYPE = createField(DSL.name("foreign_server_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.foreign_server_version</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> FOREIGN_SERVER_VERSION = createField(DSL.name("foreign_server_version"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_servers.authorization_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignServersRecord, String> AUTHORIZATION_IDENTIFIER = createField(DSL.name("authorization_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ForeignServers(Name alias, Table<ForeignServersRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ForeignServers(Name alias, Table<ForeignServersRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "foreign_servers" as SELECT _pg_foreign_servers.foreign_server_catalog,
|
||||||
|
_pg_foreign_servers.foreign_server_name,
|
||||||
|
_pg_foreign_servers.foreign_data_wrapper_catalog,
|
||||||
|
_pg_foreign_servers.foreign_data_wrapper_name,
|
||||||
|
_pg_foreign_servers.foreign_server_type,
|
||||||
|
_pg_foreign_servers.foreign_server_version,
|
||||||
|
_pg_foreign_servers.authorization_identifier
|
||||||
|
FROM information_schema._pg_foreign_servers;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_servers</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignServers(String alias) {
|
||||||
|
this(DSL.name(alias), FOREIGN_SERVERS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_servers</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignServers(Name alias) {
|
||||||
|
this(alias, FOREIGN_SERVERS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.foreign_servers</code> table reference
|
||||||
|
*/
|
||||||
|
public ForeignServers() {
|
||||||
|
this(DSL.name("foreign_servers"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignServers as(String alias) {
|
||||||
|
return new ForeignServers(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignServers as(Name alias) {
|
||||||
|
return new ForeignServers(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignServers as(Table<?> alias) {
|
||||||
|
return new ForeignServers(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers rename(String name) {
|
||||||
|
return new ForeignServers(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers rename(Name name) {
|
||||||
|
return new ForeignServers(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers rename(Table<?> name) {
|
||||||
|
return new ForeignServers(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers where(Condition condition) {
|
||||||
|
return new ForeignServers(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServers where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServers where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServers where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignServers where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignServers whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,247 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ForeignTableOptionsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ForeignTableOptions extends TableImpl<ForeignTableOptionsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.foreign_table_options</code>
|
||||||
|
*/
|
||||||
|
public static final ForeignTableOptions FOREIGN_TABLE_OPTIONS = new ForeignTableOptions();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ForeignTableOptionsRecord> getRecordType() {
|
||||||
|
return ForeignTableOptionsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_table_options.foreign_table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTableOptionsRecord, String> FOREIGN_TABLE_CATALOG = createField(DSL.name("foreign_table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_table_options.foreign_table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTableOptionsRecord, String> FOREIGN_TABLE_SCHEMA = createField(DSL.name("foreign_table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_table_options.foreign_table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTableOptionsRecord, String> FOREIGN_TABLE_NAME = createField(DSL.name("foreign_table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_table_options.option_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTableOptionsRecord, String> OPTION_NAME = createField(DSL.name("option_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_table_options.option_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTableOptionsRecord, String> OPTION_VALUE = createField(DSL.name("option_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ForeignTableOptions(Name alias, Table<ForeignTableOptionsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ForeignTableOptions(Name alias, Table<ForeignTableOptionsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "foreign_table_options" as SELECT t.foreign_table_catalog,
|
||||||
|
t.foreign_table_schema,
|
||||||
|
t.foreign_table_name,
|
||||||
|
((pg_options_to_table(t.ftoptions)).option_name)::information_schema.sql_identifier AS option_name,
|
||||||
|
((pg_options_to_table(t.ftoptions)).option_value)::information_schema.character_data AS option_value
|
||||||
|
FROM information_schema._pg_foreign_tables t;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_table_options</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignTableOptions(String alias) {
|
||||||
|
this(DSL.name(alias), FOREIGN_TABLE_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_table_options</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ForeignTableOptions(Name alias) {
|
||||||
|
this(alias, FOREIGN_TABLE_OPTIONS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.foreign_table_options</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignTableOptions() {
|
||||||
|
this(DSL.name("foreign_table_options"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions as(String alias) {
|
||||||
|
return new ForeignTableOptions(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions as(Name alias) {
|
||||||
|
return new ForeignTableOptions(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions as(Table<?> alias) {
|
||||||
|
return new ForeignTableOptions(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions rename(String name) {
|
||||||
|
return new ForeignTableOptions(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions rename(Name name) {
|
||||||
|
return new ForeignTableOptions(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions rename(Table<?> name) {
|
||||||
|
return new ForeignTableOptions(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions where(Condition condition) {
|
||||||
|
return new ForeignTableOptions(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTableOptions where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTableOptions where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTableOptions where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTableOptions where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTableOptions whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,245 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ForeignTablesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ForeignTables extends TableImpl<ForeignTablesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.foreign_tables</code>
|
||||||
|
*/
|
||||||
|
public static final ForeignTables FOREIGN_TABLES = new ForeignTables();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ForeignTablesRecord> getRecordType() {
|
||||||
|
return ForeignTablesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_tables.foreign_table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTablesRecord, String> FOREIGN_TABLE_CATALOG = createField(DSL.name("foreign_table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_tables.foreign_table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTablesRecord, String> FOREIGN_TABLE_SCHEMA = createField(DSL.name("foreign_table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_tables.foreign_table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTablesRecord, String> FOREIGN_TABLE_NAME = createField(DSL.name("foreign_table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_tables.foreign_server_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTablesRecord, String> FOREIGN_SERVER_CATALOG = createField(DSL.name("foreign_server_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.foreign_tables.foreign_server_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ForeignTablesRecord, String> FOREIGN_SERVER_NAME = createField(DSL.name("foreign_server_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ForeignTables(Name alias, Table<ForeignTablesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ForeignTables(Name alias, Table<ForeignTablesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "foreign_tables" as SELECT _pg_foreign_tables.foreign_table_catalog,
|
||||||
|
_pg_foreign_tables.foreign_table_schema,
|
||||||
|
_pg_foreign_tables.foreign_table_name,
|
||||||
|
_pg_foreign_tables.foreign_server_catalog,
|
||||||
|
_pg_foreign_tables.foreign_server_name
|
||||||
|
FROM information_schema._pg_foreign_tables;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_tables</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignTables(String alias) {
|
||||||
|
this(DSL.name(alias), FOREIGN_TABLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.foreign_tables</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ForeignTables(Name alias) {
|
||||||
|
this(alias, FOREIGN_TABLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.foreign_tables</code> table reference
|
||||||
|
*/
|
||||||
|
public ForeignTables() {
|
||||||
|
this(DSL.name("foreign_tables"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignTables as(String alias) {
|
||||||
|
return new ForeignTables(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignTables as(Name alias) {
|
||||||
|
return new ForeignTables(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ForeignTables as(Table<?> alias) {
|
||||||
|
return new ForeignTables(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables rename(String name) {
|
||||||
|
return new ForeignTables(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables rename(Name name) {
|
||||||
|
return new ForeignTables(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables rename(Table<?> name) {
|
||||||
|
return new ForeignTables(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables where(Condition condition) {
|
||||||
|
return new ForeignTables(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTables where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTables where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTables where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ForeignTables where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ForeignTables whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.InformationSchemaCatalogNameRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class InformationSchemaCatalogName extends TableImpl<InformationSchemaCatalogNameRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.information_schema_catalog_name</code>
|
||||||
|
*/
|
||||||
|
public static final InformationSchemaCatalogName INFORMATION_SCHEMA_CATALOG_NAME = new InformationSchemaCatalogName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<InformationSchemaCatalogNameRecord> getRecordType() {
|
||||||
|
return InformationSchemaCatalogNameRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.information_schema_catalog_name.catalog_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<InformationSchemaCatalogNameRecord, String> CATALOG_NAME = createField(DSL.name("catalog_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private InformationSchemaCatalogName(Name alias, Table<InformationSchemaCatalogNameRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private InformationSchemaCatalogName(Name alias, Table<InformationSchemaCatalogNameRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "information_schema_catalog_name" as SELECT (current_database())::information_schema.sql_identifier AS catalog_name;
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.information_schema_catalog_name</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public InformationSchemaCatalogName(String alias) {
|
||||||
|
this(DSL.name(alias), INFORMATION_SCHEMA_CATALOG_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased
|
||||||
|
* <code>information_schema.information_schema_catalog_name</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public InformationSchemaCatalogName(Name alias) {
|
||||||
|
this(alias, INFORMATION_SCHEMA_CATALOG_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.information_schema_catalog_name</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public InformationSchemaCatalogName() {
|
||||||
|
this(DSL.name("information_schema_catalog_name"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName as(String alias) {
|
||||||
|
return new InformationSchemaCatalogName(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName as(Name alias) {
|
||||||
|
return new InformationSchemaCatalogName(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName as(Table<?> alias) {
|
||||||
|
return new InformationSchemaCatalogName(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName rename(String name) {
|
||||||
|
return new InformationSchemaCatalogName(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName rename(Name name) {
|
||||||
|
return new InformationSchemaCatalogName(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName rename(Table<?> name) {
|
||||||
|
return new InformationSchemaCatalogName(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName where(Condition condition) {
|
||||||
|
return new InformationSchemaCatalogName(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public InformationSchemaCatalogName where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public InformationSchemaCatalogName where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public InformationSchemaCatalogName where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public InformationSchemaCatalogName where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public InformationSchemaCatalogName whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,293 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.KeyColumnUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class KeyColumnUsage extends TableImpl<KeyColumnUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.key_column_usage</code>
|
||||||
|
*/
|
||||||
|
public static final KeyColumnUsage KEY_COLUMN_USAGE = new KeyColumnUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<KeyColumnUsageRecord> getRecordType() {
|
||||||
|
return KeyColumnUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.key_column_usage.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.key_column_usage.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.key_column_usage.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.key_column_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.key_column_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.key_column_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.key_column_usage.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.key_column_usage.ordinal_position</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, Integer> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.key_column_usage.position_in_unique_constraint</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<KeyColumnUsageRecord, Integer> POSITION_IN_UNIQUE_CONSTRAINT = createField(DSL.name("position_in_unique_constraint"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private KeyColumnUsage(Name alias, Table<KeyColumnUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private KeyColumnUsage(Name alias, Table<KeyColumnUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "key_column_usage" as SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(ss.nc_nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(ss.conname)::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(ss.nr_nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(ss.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(a.attname)::information_schema.sql_identifier AS column_name,
|
||||||
|
((ss.x).n)::information_schema.cardinal_number AS ordinal_position,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (ss.contype = 'f'::"char") THEN information_schema._pg_index_position(ss.conindid, ss.confkey[(ss.x).n])
|
||||||
|
ELSE NULL::integer
|
||||||
|
END)::information_schema.cardinal_number AS position_in_unique_constraint
|
||||||
|
FROM pg_attribute a,
|
||||||
|
( SELECT r.oid AS roid,
|
||||||
|
r.relname,
|
||||||
|
r.relowner,
|
||||||
|
nc.nspname AS nc_nspname,
|
||||||
|
nr.nspname AS nr_nspname,
|
||||||
|
c.oid AS coid,
|
||||||
|
c.conname,
|
||||||
|
c.contype,
|
||||||
|
c.conindid,
|
||||||
|
c.confkey,
|
||||||
|
c.confrelid,
|
||||||
|
information_schema._pg_expandarray(c.conkey) AS x
|
||||||
|
FROM pg_namespace nr,
|
||||||
|
pg_class r,
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_constraint c
|
||||||
|
WHERE ((nr.oid = r.relnamespace) AND (r.oid = c.conrelid) AND (nc.oid = c.connamespace) AND (c.contype = ANY (ARRAY['p'::"char", 'u'::"char", 'f'::"char"])) AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND (NOT pg_is_other_temp_schema(nr.oid)))) ss
|
||||||
|
WHERE ((ss.roid = a.attrelid) AND (a.attnum = (ss.x).x) AND (NOT a.attisdropped) AND (pg_has_role(ss.relowner, 'USAGE'::text) OR has_column_privilege(ss.roid, a.attnum, 'SELECT, INSERT, UPDATE, REFERENCES'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.key_column_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public KeyColumnUsage(String alias) {
|
||||||
|
this(DSL.name(alias), KEY_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.key_column_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public KeyColumnUsage(Name alias) {
|
||||||
|
this(alias, KEY_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.key_column_usage</code> table reference
|
||||||
|
*/
|
||||||
|
public KeyColumnUsage() {
|
||||||
|
this(DSL.name("key_column_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage as(String alias) {
|
||||||
|
return new KeyColumnUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage as(Name alias) {
|
||||||
|
return new KeyColumnUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage as(Table<?> alias) {
|
||||||
|
return new KeyColumnUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage rename(String name) {
|
||||||
|
return new KeyColumnUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage rename(Name name) {
|
||||||
|
return new KeyColumnUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage rename(Table<?> name) {
|
||||||
|
return new KeyColumnUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage where(Condition condition) {
|
||||||
|
return new KeyColumnUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public KeyColumnUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public KeyColumnUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public KeyColumnUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public KeyColumnUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KeyColumnUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,438 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ParametersRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Parameters extends TableImpl<ParametersRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.parameters</code>
|
||||||
|
*/
|
||||||
|
public static final Parameters PARAMETERS = new Parameters();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ParametersRecord> getRecordType() {
|
||||||
|
return ParametersRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.ordinal_position</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.parameter_mode</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> PARAMETER_MODE = createField(DSL.name("parameter_mode"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.is_result</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> IS_RESULT = createField(DSL.name("is_result"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.as_locator</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> AS_LOCATOR = createField(DSL.name("as_locator"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.parameter_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> PARAMETER_NAME = createField(DSL.name("parameter_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> DATA_TYPE = createField(DSL.name("data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.parameters.character_maximum_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.parameters.character_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.parameters.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.parameters.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.parameters.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> SCOPE_NAME = createField(DSL.name("scope_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.parameters.maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, Integer> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.parameters.parameter_default</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ParametersRecord, String> PARAMETER_DEFAULT = createField(DSL.name("parameter_default"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Parameters(Name alias, Table<ParametersRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Parameters(Name alias, Table<ParametersRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "parameters" as SELECT (current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(ss.n_nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(ss.proname, ss.p_oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
((ss.x).n)::information_schema.cardinal_number AS ordinal_position,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (ss.proargmodes IS NULL) THEN 'IN'::text
|
||||||
|
WHEN (ss.proargmodes[(ss.x).n] = 'i'::"char") THEN 'IN'::text
|
||||||
|
WHEN (ss.proargmodes[(ss.x).n] = 'o'::"char") THEN 'OUT'::text
|
||||||
|
WHEN (ss.proargmodes[(ss.x).n] = 'b'::"char") THEN 'INOUT'::text
|
||||||
|
WHEN (ss.proargmodes[(ss.x).n] = 'v'::"char") THEN 'IN'::text
|
||||||
|
WHEN (ss.proargmodes[(ss.x).n] = 't'::"char") THEN 'OUT'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS parameter_mode,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS is_result,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS as_locator,
|
||||||
|
(NULLIF(ss.proargnames[(ss.x).n], ''::text))::information_schema.sql_identifier AS parameter_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN ((t.typelem <> (0)::oid) AND (t.typlen = '-1'::integer)) THEN 'ARRAY'::text
|
||||||
|
WHEN (nt.nspname = 'pg_catalog'::name) THEN format_type(t.oid, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END)::information_schema.character_data AS data_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS character_maximum_length,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS character_octet_length,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS datetime_precision,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS interval_precision,
|
||||||
|
(current_database())::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS maximum_cardinality,
|
||||||
|
((ss.x).n)::information_schema.sql_identifier AS dtd_identifier,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN pg_has_role(ss.proowner, 'USAGE'::text) THEN pg_get_function_arg_default(ss.p_oid, (ss.x).n)
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS parameter_default
|
||||||
|
FROM pg_type t,
|
||||||
|
pg_namespace nt,
|
||||||
|
( SELECT n.nspname AS n_nspname,
|
||||||
|
p.proname,
|
||||||
|
p.oid AS p_oid,
|
||||||
|
p.proowner,
|
||||||
|
p.proargnames,
|
||||||
|
p.proargmodes,
|
||||||
|
information_schema._pg_expandarray(COALESCE(p.proallargtypes, (p.proargtypes)::oid[])) AS x
|
||||||
|
FROM pg_namespace n,
|
||||||
|
pg_proc p
|
||||||
|
WHERE ((n.oid = p.pronamespace) AND (pg_has_role(p.proowner, 'USAGE'::text) OR has_function_privilege(p.oid, 'EXECUTE'::text)))) ss
|
||||||
|
WHERE ((t.oid = (ss.x).x) AND (t.typnamespace = nt.oid));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.parameters</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Parameters(String alias) {
|
||||||
|
this(DSL.name(alias), PARAMETERS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.parameters</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Parameters(Name alias) {
|
||||||
|
this(alias, PARAMETERS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.parameters</code> table reference
|
||||||
|
*/
|
||||||
|
public Parameters() {
|
||||||
|
this(DSL.name("parameters"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Parameters as(String alias) {
|
||||||
|
return new Parameters(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Parameters as(Name alias) {
|
||||||
|
return new Parameters(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Parameters as(Table<?> alias) {
|
||||||
|
return new Parameters(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters rename(String name) {
|
||||||
|
return new Parameters(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters rename(Name name) {
|
||||||
|
return new Parameters(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters rename(Table<?> name) {
|
||||||
|
return new Parameters(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters where(Condition condition) {
|
||||||
|
return new Parameters(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Parameters where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Parameters where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Parameters where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Parameters where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Parameters whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,308 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.ReferentialConstraintsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class ReferentialConstraints extends TableImpl<ReferentialConstraintsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.referential_constraints</code>
|
||||||
|
*/
|
||||||
|
public static final ReferentialConstraints REFERENTIAL_CONSTRAINTS = new ReferentialConstraints();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<ReferentialConstraintsRecord> getRecordType() {
|
||||||
|
return ReferentialConstraintsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.unique_constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> UNIQUE_CONSTRAINT_CATALOG = createField(DSL.name("unique_constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.unique_constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> UNIQUE_CONSTRAINT_SCHEMA = createField(DSL.name("unique_constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.unique_constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> UNIQUE_CONSTRAINT_NAME = createField(DSL.name("unique_constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.match_option</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> MATCH_OPTION = createField(DSL.name("match_option"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.update_rule</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> UPDATE_RULE = createField(DSL.name("update_rule"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.referential_constraints.delete_rule</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<ReferentialConstraintsRecord, String> DELETE_RULE = createField(DSL.name("delete_rule"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private ReferentialConstraints(Name alias, Table<ReferentialConstraintsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ReferentialConstraints(Name alias, Table<ReferentialConstraintsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "referential_constraints" as SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(ncon.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(con.conname)::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (npkc.nspname IS NULL) THEN NULL::name
|
||||||
|
ELSE current_database()
|
||||||
|
END)::information_schema.sql_identifier AS unique_constraint_catalog,
|
||||||
|
(npkc.nspname)::information_schema.sql_identifier AS unique_constraint_schema,
|
||||||
|
(pkc.conname)::information_schema.sql_identifier AS unique_constraint_name,
|
||||||
|
(
|
||||||
|
CASE con.confmatchtype
|
||||||
|
WHEN 'f'::"char" THEN 'FULL'::text
|
||||||
|
WHEN 'p'::"char" THEN 'PARTIAL'::text
|
||||||
|
WHEN 's'::"char" THEN 'NONE'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS match_option,
|
||||||
|
(
|
||||||
|
CASE con.confupdtype
|
||||||
|
WHEN 'c'::"char" THEN 'CASCADE'::text
|
||||||
|
WHEN 'n'::"char" THEN 'SET NULL'::text
|
||||||
|
WHEN 'd'::"char" THEN 'SET DEFAULT'::text
|
||||||
|
WHEN 'r'::"char" THEN 'RESTRICT'::text
|
||||||
|
WHEN 'a'::"char" THEN 'NO ACTION'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS update_rule,
|
||||||
|
(
|
||||||
|
CASE con.confdeltype
|
||||||
|
WHEN 'c'::"char" THEN 'CASCADE'::text
|
||||||
|
WHEN 'n'::"char" THEN 'SET NULL'::text
|
||||||
|
WHEN 'd'::"char" THEN 'SET DEFAULT'::text
|
||||||
|
WHEN 'r'::"char" THEN 'RESTRICT'::text
|
||||||
|
WHEN 'a'::"char" THEN 'NO ACTION'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS delete_rule
|
||||||
|
FROM ((((((pg_namespace ncon
|
||||||
|
JOIN pg_constraint con ON ((ncon.oid = con.connamespace)))
|
||||||
|
JOIN pg_class c ON (((con.conrelid = c.oid) AND (con.contype = 'f'::"char"))))
|
||||||
|
LEFT JOIN pg_depend d1 ON (((d1.objid = con.oid) AND (d1.classid = ('pg_constraint'::regclass)::oid) AND (d1.refclassid = ('pg_class'::regclass)::oid) AND (d1.refobjsubid = 0))))
|
||||||
|
LEFT JOIN pg_depend d2 ON (((d2.refclassid = ('pg_constraint'::regclass)::oid) AND (d2.classid = ('pg_class'::regclass)::oid) AND (d2.objid = d1.refobjid) AND (d2.objsubid = 0) AND (d2.deptype = 'i'::"char"))))
|
||||||
|
LEFT JOIN pg_constraint pkc ON (((pkc.oid = d2.refobjid) AND (pkc.contype = ANY (ARRAY['p'::"char", 'u'::"char"])) AND (pkc.conrelid = con.confrelid))))
|
||||||
|
LEFT JOIN pg_namespace npkc ON ((pkc.connamespace = npkc.oid)))
|
||||||
|
WHERE (pg_has_role(c.relowner, 'USAGE'::text) OR has_table_privilege(c.oid, 'INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(c.oid, 'INSERT, UPDATE, REFERENCES'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.referential_constraints</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ReferentialConstraints(String alias) {
|
||||||
|
this(DSL.name(alias), REFERENTIAL_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.referential_constraints</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public ReferentialConstraints(Name alias) {
|
||||||
|
this(alias, REFERENTIAL_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.referential_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public ReferentialConstraints() {
|
||||||
|
this(DSL.name("referential_constraints"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints as(String alias) {
|
||||||
|
return new ReferentialConstraints(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints as(Name alias) {
|
||||||
|
return new ReferentialConstraints(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints as(Table<?> alias) {
|
||||||
|
return new ReferentialConstraints(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints rename(String name) {
|
||||||
|
return new ReferentialConstraints(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints rename(Name name) {
|
||||||
|
return new ReferentialConstraints(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints rename(Table<?> name) {
|
||||||
|
return new ReferentialConstraints(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints where(Condition condition) {
|
||||||
|
return new ReferentialConstraints(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ReferentialConstraints where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ReferentialConstraints where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ReferentialConstraints where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public ReferentialConstraints where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public ReferentialConstraints whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoleColumnGrantsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoleColumnGrants extends TableImpl<RoleColumnGrantsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.role_column_grants</code>
|
||||||
|
*/
|
||||||
|
public static final RoleColumnGrants ROLE_COLUMN_GRANTS = new RoleColumnGrants();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoleColumnGrantsRecord> getRecordType() {
|
||||||
|
return RoleColumnGrantsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_column_grants.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_column_grants.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_column_grants.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_column_grants.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_column_grants.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_column_grants.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_column_grants.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_column_grants.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleColumnGrantsRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoleColumnGrants(Name alias, Table<RoleColumnGrantsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoleColumnGrants(Name alias, Table<RoleColumnGrantsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "role_column_grants" as SELECT column_privileges.grantor,
|
||||||
|
column_privileges.grantee,
|
||||||
|
column_privileges.table_catalog,
|
||||||
|
column_privileges.table_schema,
|
||||||
|
column_privileges.table_name,
|
||||||
|
column_privileges.column_name,
|
||||||
|
column_privileges.privilege_type,
|
||||||
|
column_privileges.is_grantable
|
||||||
|
FROM information_schema.column_privileges
|
||||||
|
WHERE (((column_privileges.grantor)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)) OR ((column_privileges.grantee)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_column_grants</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoleColumnGrants(String alias) {
|
||||||
|
this(DSL.name(alias), ROLE_COLUMN_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_column_grants</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoleColumnGrants(Name alias) {
|
||||||
|
this(alias, ROLE_COLUMN_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.role_column_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleColumnGrants() {
|
||||||
|
this(DSL.name("role_column_grants"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants as(String alias) {
|
||||||
|
return new RoleColumnGrants(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants as(Name alias) {
|
||||||
|
return new RoleColumnGrants(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants as(Table<?> alias) {
|
||||||
|
return new RoleColumnGrants(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants rename(String name) {
|
||||||
|
return new RoleColumnGrants(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants rename(Name name) {
|
||||||
|
return new RoleColumnGrants(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants rename(Table<?> name) {
|
||||||
|
return new RoleColumnGrants(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants where(Condition condition) {
|
||||||
|
return new RoleColumnGrants(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleColumnGrants where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleColumnGrants where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleColumnGrants where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleColumnGrants where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleColumnGrants whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,283 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoleRoutineGrantsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoleRoutineGrants extends TableImpl<RoleRoutineGrantsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.role_routine_grants</code>
|
||||||
|
*/
|
||||||
|
public static final RoleRoutineGrants ROLE_ROUTINE_GRANTS = new RoleRoutineGrants();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoleRoutineGrantsRecord> getRecordType() {
|
||||||
|
return RoleRoutineGrantsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_routine_grants.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_routine_grants.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_routine_grants.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleRoutineGrantsRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoleRoutineGrants(Name alias, Table<RoleRoutineGrantsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoleRoutineGrants(Name alias, Table<RoleRoutineGrantsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "role_routine_grants" as SELECT routine_privileges.grantor,
|
||||||
|
routine_privileges.grantee,
|
||||||
|
routine_privileges.specific_catalog,
|
||||||
|
routine_privileges.specific_schema,
|
||||||
|
routine_privileges.specific_name,
|
||||||
|
routine_privileges.routine_catalog,
|
||||||
|
routine_privileges.routine_schema,
|
||||||
|
routine_privileges.routine_name,
|
||||||
|
routine_privileges.privilege_type,
|
||||||
|
routine_privileges.is_grantable
|
||||||
|
FROM information_schema.routine_privileges
|
||||||
|
WHERE (((routine_privileges.grantor)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)) OR ((routine_privileges.grantee)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_routine_grants</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoleRoutineGrants(String alias) {
|
||||||
|
this(DSL.name(alias), ROLE_ROUTINE_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_routine_grants</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoleRoutineGrants(Name alias) {
|
||||||
|
this(alias, ROLE_ROUTINE_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.role_routine_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleRoutineGrants() {
|
||||||
|
this(DSL.name("role_routine_grants"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants as(String alias) {
|
||||||
|
return new RoleRoutineGrants(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants as(Name alias) {
|
||||||
|
return new RoleRoutineGrants(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants as(Table<?> alias) {
|
||||||
|
return new RoleRoutineGrants(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants rename(String name) {
|
||||||
|
return new RoleRoutineGrants(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants rename(Name name) {
|
||||||
|
return new RoleRoutineGrants(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants rename(Table<?> name) {
|
||||||
|
return new RoleRoutineGrants(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants where(Condition condition) {
|
||||||
|
return new RoleRoutineGrants(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleRoutineGrants where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleRoutineGrants where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleRoutineGrants where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleRoutineGrants where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleRoutineGrants whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,268 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoleTableGrantsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoleTableGrants extends TableImpl<RoleTableGrantsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.role_table_grants</code>
|
||||||
|
*/
|
||||||
|
public static final RoleTableGrants ROLE_TABLE_GRANTS = new RoleTableGrants();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoleTableGrantsRecord> getRecordType() {
|
||||||
|
return RoleTableGrantsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_table_grants.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_table_grants.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_table_grants.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_table_grants.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_table_grants.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_table_grants.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_table_grants.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_table_grants.with_hierarchy</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleTableGrantsRecord, String> WITH_HIERARCHY = createField(DSL.name("with_hierarchy"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoleTableGrants(Name alias, Table<RoleTableGrantsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoleTableGrants(Name alias, Table<RoleTableGrantsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "role_table_grants" as SELECT table_privileges.grantor,
|
||||||
|
table_privileges.grantee,
|
||||||
|
table_privileges.table_catalog,
|
||||||
|
table_privileges.table_schema,
|
||||||
|
table_privileges.table_name,
|
||||||
|
table_privileges.privilege_type,
|
||||||
|
table_privileges.is_grantable,
|
||||||
|
table_privileges.with_hierarchy
|
||||||
|
FROM information_schema.table_privileges
|
||||||
|
WHERE (((table_privileges.grantor)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)) OR ((table_privileges.grantee)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_table_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleTableGrants(String alias) {
|
||||||
|
this(DSL.name(alias), ROLE_TABLE_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_table_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleTableGrants(Name alias) {
|
||||||
|
this(alias, ROLE_TABLE_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.role_table_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleTableGrants() {
|
||||||
|
this(DSL.name("role_table_grants"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants as(String alias) {
|
||||||
|
return new RoleTableGrants(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants as(Name alias) {
|
||||||
|
return new RoleTableGrants(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants as(Table<?> alias) {
|
||||||
|
return new RoleTableGrants(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants rename(String name) {
|
||||||
|
return new RoleTableGrants(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants rename(Name name) {
|
||||||
|
return new RoleTableGrants(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants rename(Table<?> name) {
|
||||||
|
return new RoleTableGrants(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants where(Condition condition) {
|
||||||
|
return new RoleTableGrants(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleTableGrants where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleTableGrants where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleTableGrants where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleTableGrants where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleTableGrants whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,256 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoleUdtGrantsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoleUdtGrants extends TableImpl<RoleUdtGrantsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.role_udt_grants</code>
|
||||||
|
*/
|
||||||
|
public static final RoleUdtGrants ROLE_UDT_GRANTS = new RoleUdtGrants();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoleUdtGrantsRecord> getRecordType() {
|
||||||
|
return RoleUdtGrantsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_udt_grants.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_udt_grants.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_udt_grants.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_udt_grants.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_udt_grants.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_udt_grants.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_udt_grants.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUdtGrantsRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoleUdtGrants(Name alias, Table<RoleUdtGrantsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoleUdtGrants(Name alias, Table<RoleUdtGrantsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "role_udt_grants" as SELECT udt_privileges.grantor,
|
||||||
|
udt_privileges.grantee,
|
||||||
|
udt_privileges.udt_catalog,
|
||||||
|
udt_privileges.udt_schema,
|
||||||
|
udt_privileges.udt_name,
|
||||||
|
udt_privileges.privilege_type,
|
||||||
|
udt_privileges.is_grantable
|
||||||
|
FROM information_schema.udt_privileges
|
||||||
|
WHERE (((udt_privileges.grantor)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)) OR ((udt_privileges.grantee)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_udt_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleUdtGrants(String alias) {
|
||||||
|
this(DSL.name(alias), ROLE_UDT_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_udt_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleUdtGrants(Name alias) {
|
||||||
|
this(alias, ROLE_UDT_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.role_udt_grants</code> table reference
|
||||||
|
*/
|
||||||
|
public RoleUdtGrants() {
|
||||||
|
this(DSL.name("role_udt_grants"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants as(String alias) {
|
||||||
|
return new RoleUdtGrants(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants as(Name alias) {
|
||||||
|
return new RoleUdtGrants(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants as(Table<?> alias) {
|
||||||
|
return new RoleUdtGrants(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants rename(String name) {
|
||||||
|
return new RoleUdtGrants(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants rename(Name name) {
|
||||||
|
return new RoleUdtGrants(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants rename(Table<?> name) {
|
||||||
|
return new RoleUdtGrants(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants where(Condition condition) {
|
||||||
|
return new RoleUdtGrants(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUdtGrants where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUdtGrants where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUdtGrants where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUdtGrants where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUdtGrants whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,267 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoleUsageGrantsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoleUsageGrants extends TableImpl<RoleUsageGrantsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.role_usage_grants</code>
|
||||||
|
*/
|
||||||
|
public static final RoleUsageGrants ROLE_USAGE_GRANTS = new RoleUsageGrants();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoleUsageGrantsRecord> getRecordType() {
|
||||||
|
return RoleUsageGrantsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_usage_grants.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_usage_grants.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_usage_grants.object_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> OBJECT_CATALOG = createField(DSL.name("object_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_usage_grants.object_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> OBJECT_SCHEMA = createField(DSL.name("object_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_usage_grants.object_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> OBJECT_NAME = createField(DSL.name("object_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.role_usage_grants.object_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> OBJECT_TYPE = createField(DSL.name("object_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_usage_grants.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.role_usage_grants.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoleUsageGrantsRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoleUsageGrants(Name alias, Table<RoleUsageGrantsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoleUsageGrants(Name alias, Table<RoleUsageGrantsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "role_usage_grants" as SELECT usage_privileges.grantor,
|
||||||
|
usage_privileges.grantee,
|
||||||
|
usage_privileges.object_catalog,
|
||||||
|
usage_privileges.object_schema,
|
||||||
|
usage_privileges.object_name,
|
||||||
|
usage_privileges.object_type,
|
||||||
|
usage_privileges.privilege_type,
|
||||||
|
usage_privileges.is_grantable
|
||||||
|
FROM information_schema.usage_privileges
|
||||||
|
WHERE (((usage_privileges.grantor)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)) OR ((usage_privileges.grantee)::name IN ( SELECT enabled_roles.role_name
|
||||||
|
FROM information_schema.enabled_roles)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_usage_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleUsageGrants(String alias) {
|
||||||
|
this(DSL.name(alias), ROLE_USAGE_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.role_usage_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleUsageGrants(Name alias) {
|
||||||
|
this(alias, ROLE_USAGE_GRANTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.role_usage_grants</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoleUsageGrants() {
|
||||||
|
this(DSL.name("role_usage_grants"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants as(String alias) {
|
||||||
|
return new RoleUsageGrants(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants as(Name alias) {
|
||||||
|
return new RoleUsageGrants(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants as(Table<?> alias) {
|
||||||
|
return new RoleUsageGrants(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants rename(String name) {
|
||||||
|
return new RoleUsageGrants(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants rename(Name name) {
|
||||||
|
return new RoleUsageGrants(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants rename(Table<?> name) {
|
||||||
|
return new RoleUsageGrants(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants where(Condition condition) {
|
||||||
|
return new RoleUsageGrants(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUsageGrants where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUsageGrants where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUsageGrants where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoleUsageGrants where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoleUsageGrants whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,288 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoutineColumnUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoutineColumnUsage extends TableImpl<RoutineColumnUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.routine_column_usage</code>
|
||||||
|
*/
|
||||||
|
public static final RoutineColumnUsage ROUTINE_COLUMN_USAGE = new RoutineColumnUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoutineColumnUsageRecord> getRecordType() {
|
||||||
|
return RoutineColumnUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_column_usage.column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineColumnUsageRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoutineColumnUsage(Name alias, Table<RoutineColumnUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoutineColumnUsage(Name alias, Table<RoutineColumnUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "routine_column_usage" as SELECT DISTINCT (current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS routine_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS routine_schema,
|
||||||
|
(p.proname)::information_schema.sql_identifier AS routine_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(t.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(a.attname)::information_schema.sql_identifier AS column_name
|
||||||
|
FROM pg_namespace np,
|
||||||
|
pg_proc p,
|
||||||
|
pg_depend d,
|
||||||
|
pg_class t,
|
||||||
|
pg_namespace nt,
|
||||||
|
pg_attribute a
|
||||||
|
WHERE ((np.oid = p.pronamespace) AND (p.oid = d.objid) AND (d.classid = ('pg_proc'::regclass)::oid) AND (d.refobjid = t.oid) AND (d.refclassid = ('pg_class'::regclass)::oid) AND (t.relnamespace = nt.oid) AND (t.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND (t.oid = a.attrelid) AND (d.refobjsubid = a.attnum) AND pg_has_role(t.relowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_column_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineColumnUsage(String alias) {
|
||||||
|
this(DSL.name(alias), ROUTINE_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_column_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineColumnUsage(Name alias) {
|
||||||
|
this(alias, ROUTINE_COLUMN_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.routine_column_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoutineColumnUsage() {
|
||||||
|
this(DSL.name("routine_column_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage as(String alias) {
|
||||||
|
return new RoutineColumnUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage as(Name alias) {
|
||||||
|
return new RoutineColumnUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage as(Table<?> alias) {
|
||||||
|
return new RoutineColumnUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage rename(String name) {
|
||||||
|
return new RoutineColumnUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage rename(Name name) {
|
||||||
|
return new RoutineColumnUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage rename(Table<?> name) {
|
||||||
|
return new RoutineColumnUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage where(Condition condition) {
|
||||||
|
return new RoutineColumnUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineColumnUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineColumnUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineColumnUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineColumnUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineColumnUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,301 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoutinePrivilegesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoutinePrivileges extends TableImpl<RoutinePrivilegesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.routine_privileges</code>
|
||||||
|
*/
|
||||||
|
public static final RoutinePrivileges ROUTINE_PRIVILEGES = new RoutinePrivileges();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoutinePrivilegesRecord> getRecordType() {
|
||||||
|
return RoutinePrivilegesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routine_privileges.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routine_privileges.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_privileges.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinePrivilegesRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoutinePrivileges(Name alias, Table<RoutinePrivilegesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoutinePrivileges(Name alias, Table<RoutinePrivilegesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "routine_privileges" as SELECT (u_grantor.rolname)::information_schema.sql_identifier AS grantor,
|
||||||
|
(grantee.rolname)::information_schema.sql_identifier AS grantee,
|
||||||
|
(current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS routine_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS routine_schema,
|
||||||
|
(p.proname)::information_schema.sql_identifier AS routine_name,
|
||||||
|
('EXECUTE'::character varying)::information_schema.character_data AS privilege_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (pg_has_role(grantee.oid, p.proowner, 'USAGE'::text) OR p.grantable) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_grantable
|
||||||
|
FROM ( SELECT pg_proc.oid,
|
||||||
|
pg_proc.proname,
|
||||||
|
pg_proc.proowner,
|
||||||
|
pg_proc.pronamespace,
|
||||||
|
(aclexplode(COALESCE(pg_proc.proacl, acldefault('f'::"char", pg_proc.proowner)))).grantor AS grantor,
|
||||||
|
(aclexplode(COALESCE(pg_proc.proacl, acldefault('f'::"char", pg_proc.proowner)))).grantee AS grantee,
|
||||||
|
(aclexplode(COALESCE(pg_proc.proacl, acldefault('f'::"char", pg_proc.proowner)))).privilege_type AS privilege_type,
|
||||||
|
(aclexplode(COALESCE(pg_proc.proacl, acldefault('f'::"char", pg_proc.proowner)))).is_grantable AS is_grantable
|
||||||
|
FROM pg_proc) p(oid, proname, proowner, pronamespace, grantor, grantee, prtype, grantable),
|
||||||
|
pg_namespace n,
|
||||||
|
pg_authid u_grantor,
|
||||||
|
( SELECT pg_authid.oid,
|
||||||
|
pg_authid.rolname
|
||||||
|
FROM pg_authid
|
||||||
|
UNION ALL
|
||||||
|
SELECT (0)::oid AS oid,
|
||||||
|
'PUBLIC'::name) grantee(oid, rolname)
|
||||||
|
WHERE ((p.pronamespace = n.oid) AND (grantee.oid = p.grantee) AND (u_grantor.oid = p.grantor) AND (p.prtype = 'EXECUTE'::text) AND (pg_has_role(u_grantor.oid, 'USAGE'::text) OR pg_has_role(grantee.oid, 'USAGE'::text) OR (grantee.rolname = 'PUBLIC'::name)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_privileges</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutinePrivileges(String alias) {
|
||||||
|
this(DSL.name(alias), ROUTINE_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_privileges</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutinePrivileges(Name alias) {
|
||||||
|
this(alias, ROUTINE_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.routine_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoutinePrivileges() {
|
||||||
|
this(DSL.name("routine_privileges"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges as(String alias) {
|
||||||
|
return new RoutinePrivileges(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges as(Name alias) {
|
||||||
|
return new RoutinePrivileges(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges as(Table<?> alias) {
|
||||||
|
return new RoutinePrivileges(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges rename(String name) {
|
||||||
|
return new RoutinePrivileges(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges rename(Name name) {
|
||||||
|
return new RoutinePrivileges(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges rename(Table<?> name) {
|
||||||
|
return new RoutinePrivileges(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges where(Condition condition) {
|
||||||
|
return new RoutinePrivileges(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutinePrivileges where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutinePrivileges where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutinePrivileges where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutinePrivileges where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutinePrivileges whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,259 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoutineRoutineUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoutineRoutineUsage extends TableImpl<RoutineRoutineUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.routine_routine_usage</code>
|
||||||
|
*/
|
||||||
|
public static final RoutineRoutineUsage ROUTINE_ROUTINE_USAGE = new RoutineRoutineUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoutineRoutineUsageRecord> getRecordType() {
|
||||||
|
return RoutineRoutineUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_routine_usage.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineRoutineUsageRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_routine_usage.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineRoutineUsageRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_routine_usage.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineRoutineUsageRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_routine_usage.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineRoutineUsageRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_routine_usage.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineRoutineUsageRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_routine_usage.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineRoutineUsageRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoutineRoutineUsage(Name alias, Table<RoutineRoutineUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoutineRoutineUsage(Name alias, Table<RoutineRoutineUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "routine_routine_usage" as SELECT DISTINCT (current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS routine_catalog,
|
||||||
|
(np1.nspname)::information_schema.sql_identifier AS routine_schema,
|
||||||
|
(nameconcatoid(p1.proname, p1.oid))::information_schema.sql_identifier AS routine_name
|
||||||
|
FROM pg_namespace np,
|
||||||
|
pg_proc p,
|
||||||
|
pg_depend d,
|
||||||
|
pg_proc p1,
|
||||||
|
pg_namespace np1
|
||||||
|
WHERE ((np.oid = p.pronamespace) AND (p.oid = d.objid) AND (d.classid = ('pg_proc'::regclass)::oid) AND (d.refobjid = p1.oid) AND (d.refclassid = ('pg_proc'::regclass)::oid) AND (p1.pronamespace = np1.oid) AND (p.prokind = ANY (ARRAY['f'::"char", 'p'::"char"])) AND (p1.prokind = ANY (ARRAY['f'::"char", 'p'::"char"])) AND pg_has_role(p1.proowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_routine_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineRoutineUsage(String alias) {
|
||||||
|
this(DSL.name(alias), ROUTINE_ROUTINE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_routine_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineRoutineUsage(Name alias) {
|
||||||
|
this(alias, ROUTINE_ROUTINE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.routine_routine_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoutineRoutineUsage() {
|
||||||
|
this(DSL.name("routine_routine_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage as(String alias) {
|
||||||
|
return new RoutineRoutineUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage as(Name alias) {
|
||||||
|
return new RoutineRoutineUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage as(Table<?> alias) {
|
||||||
|
return new RoutineRoutineUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage rename(String name) {
|
||||||
|
return new RoutineRoutineUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage rename(Name name) {
|
||||||
|
return new RoutineRoutineUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage rename(Table<?> name) {
|
||||||
|
return new RoutineRoutineUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage where(Condition condition) {
|
||||||
|
return new RoutineRoutineUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineRoutineUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineRoutineUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineRoutineUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineRoutineUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineRoutineUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoutineSequenceUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoutineSequenceUsage extends TableImpl<RoutineSequenceUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.routine_sequence_usage</code>
|
||||||
|
*/
|
||||||
|
public static final RoutineSequenceUsage ROUTINE_SEQUENCE_USAGE = new RoutineSequenceUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoutineSequenceUsageRecord> getRecordType() {
|
||||||
|
return RoutineSequenceUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.sequence_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> SEQUENCE_CATALOG = createField(DSL.name("sequence_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.sequence_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> SEQUENCE_SCHEMA = createField(DSL.name("sequence_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_sequence_usage.sequence_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineSequenceUsageRecord, String> SEQUENCE_NAME = createField(DSL.name("sequence_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoutineSequenceUsage(Name alias, Table<RoutineSequenceUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoutineSequenceUsage(Name alias, Table<RoutineSequenceUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "routine_sequence_usage" as SELECT DISTINCT (current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS routine_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS routine_schema,
|
||||||
|
(p.proname)::information_schema.sql_identifier AS routine_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS sequence_catalog,
|
||||||
|
(ns.nspname)::information_schema.sql_identifier AS sequence_schema,
|
||||||
|
(s.relname)::information_schema.sql_identifier AS sequence_name
|
||||||
|
FROM pg_namespace np,
|
||||||
|
pg_proc p,
|
||||||
|
pg_depend d,
|
||||||
|
pg_class s,
|
||||||
|
pg_namespace ns
|
||||||
|
WHERE ((np.oid = p.pronamespace) AND (p.oid = d.objid) AND (d.classid = ('pg_proc'::regclass)::oid) AND (d.refobjid = s.oid) AND (d.refclassid = ('pg_class'::regclass)::oid) AND (s.relnamespace = ns.oid) AND (s.relkind = 'S'::"char") AND pg_has_role(s.relowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_sequence_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineSequenceUsage(String alias) {
|
||||||
|
this(DSL.name(alias), ROUTINE_SEQUENCE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_sequence_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineSequenceUsage(Name alias) {
|
||||||
|
this(alias, ROUTINE_SEQUENCE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.routine_sequence_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoutineSequenceUsage() {
|
||||||
|
this(DSL.name("routine_sequence_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage as(String alias) {
|
||||||
|
return new RoutineSequenceUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage as(Name alias) {
|
||||||
|
return new RoutineSequenceUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage as(Table<?> alias) {
|
||||||
|
return new RoutineSequenceUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage rename(String name) {
|
||||||
|
return new RoutineSequenceUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage rename(Name name) {
|
||||||
|
return new RoutineSequenceUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage rename(Table<?> name) {
|
||||||
|
return new RoutineSequenceUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage where(Condition condition) {
|
||||||
|
return new RoutineSequenceUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineSequenceUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineSequenceUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineSequenceUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineSequenceUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineSequenceUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,280 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoutineTableUsageRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class RoutineTableUsage extends TableImpl<RoutineTableUsageRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.routine_table_usage</code>
|
||||||
|
*/
|
||||||
|
public static final RoutineTableUsage ROUTINE_TABLE_USAGE = new RoutineTableUsage();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoutineTableUsageRecord> getRecordType() {
|
||||||
|
return RoutineTableUsageRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routine_table_usage.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutineTableUsageRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private RoutineTableUsage(Name alias, Table<RoutineTableUsageRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private RoutineTableUsage(Name alias, Table<RoutineTableUsageRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "routine_table_usage" as SELECT DISTINCT (current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS routine_catalog,
|
||||||
|
(np.nspname)::information_schema.sql_identifier AS routine_schema,
|
||||||
|
(p.proname)::information_schema.sql_identifier AS routine_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(t.relname)::information_schema.sql_identifier AS table_name
|
||||||
|
FROM pg_namespace np,
|
||||||
|
pg_proc p,
|
||||||
|
pg_depend d,
|
||||||
|
pg_class t,
|
||||||
|
pg_namespace nt
|
||||||
|
WHERE ((np.oid = p.pronamespace) AND (p.oid = d.objid) AND (d.classid = ('pg_proc'::regclass)::oid) AND (d.refobjid = t.oid) AND (d.refclassid = ('pg_class'::regclass)::oid) AND (t.relnamespace = nt.oid) AND (t.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND pg_has_role(t.relowner, 'USAGE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_table_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineTableUsage(String alias) {
|
||||||
|
this(DSL.name(alias), ROUTINE_TABLE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routine_table_usage</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public RoutineTableUsage(Name alias) {
|
||||||
|
this(alias, ROUTINE_TABLE_USAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.routine_table_usage</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public RoutineTableUsage() {
|
||||||
|
this(DSL.name("routine_table_usage"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage as(String alias) {
|
||||||
|
return new RoutineTableUsage(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage as(Name alias) {
|
||||||
|
return new RoutineTableUsage(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage as(Table<?> alias) {
|
||||||
|
return new RoutineTableUsage(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage rename(String name) {
|
||||||
|
return new RoutineTableUsage(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage rename(Name name) {
|
||||||
|
return new RoutineTableUsage(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage rename(Table<?> name) {
|
||||||
|
return new RoutineTableUsage(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage where(Condition condition) {
|
||||||
|
return new RoutineTableUsage(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineTableUsage where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineTableUsage where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineTableUsage where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public RoutineTableUsage where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RoutineTableUsage whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,787 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.RoutinesRecord;
|
||||||
|
|
||||||
|
import java.time.OffsetDateTime;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Routines extends TableImpl<RoutinesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.routines</code>
|
||||||
|
*/
|
||||||
|
public static final Routines ROUTINES = new Routines();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<RoutinesRecord> getRecordType() {
|
||||||
|
return RoutinesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SPECIFIC_CATALOG = createField(DSL.name("specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SPECIFIC_SCHEMA = createField(DSL.name("specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SPECIFIC_NAME = createField(DSL.name("specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.routine_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> ROUTINE_CATALOG = createField(DSL.name("routine_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.routine_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> ROUTINE_SCHEMA = createField(DSL.name("routine_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.routine_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> ROUTINE_NAME = createField(DSL.name("routine_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.routine_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> ROUTINE_TYPE = createField(DSL.name("routine_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.module_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> MODULE_CATALOG = createField(DSL.name("module_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.module_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> MODULE_SCHEMA = createField(DSL.name("module_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.module_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> MODULE_NAME = createField(DSL.name("module_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> UDT_NAME = createField(DSL.name("udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> DATA_TYPE = createField(DSL.name("data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.character_maximum_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.character_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> COLLATION_NAME = createField(DSL.name("collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.type_udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> TYPE_UDT_CATALOG = createField(DSL.name("type_udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.type_udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> TYPE_UDT_SCHEMA = createField(DSL.name("type_udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.type_udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> TYPE_UDT_NAME = createField(DSL.name("type_udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SCOPE_NAME = createField(DSL.name("scope_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.routine_body</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> ROUTINE_BODY = createField(DSL.name("routine_body"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.routine_definition</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> ROUTINE_DEFINITION = createField(DSL.name("routine_definition"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.external_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> EXTERNAL_NAME = createField(DSL.name("external_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.external_language</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> EXTERNAL_LANGUAGE = createField(DSL.name("external_language"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.parameter_style</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> PARAMETER_STYLE = createField(DSL.name("parameter_style"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.is_deterministic</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> IS_DETERMINISTIC = createField(DSL.name("is_deterministic"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.sql_data_access</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SQL_DATA_ACCESS = createField(DSL.name("sql_data_access"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.is_null_call</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> IS_NULL_CALL = createField(DSL.name("is_null_call"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.sql_path</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SQL_PATH = createField(DSL.name("sql_path"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.schema_level_routine</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SCHEMA_LEVEL_ROUTINE = createField(DSL.name("schema_level_routine"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.max_dynamic_result_sets</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> MAX_DYNAMIC_RESULT_SETS = createField(DSL.name("max_dynamic_result_sets"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.is_user_defined_cast</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> IS_USER_DEFINED_CAST = createField(DSL.name("is_user_defined_cast"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.is_implicitly_invocable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> IS_IMPLICITLY_INVOCABLE = createField(DSL.name("is_implicitly_invocable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.security_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> SECURITY_TYPE = createField(DSL.name("security_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.to_sql_specific_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> TO_SQL_SPECIFIC_CATALOG = createField(DSL.name("to_sql_specific_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.to_sql_specific_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> TO_SQL_SPECIFIC_SCHEMA = createField(DSL.name("to_sql_specific_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.to_sql_specific_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> TO_SQL_SPECIFIC_NAME = createField(DSL.name("to_sql_specific_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.as_locator</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> AS_LOCATOR = createField(DSL.name("as_locator"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.created</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, OffsetDateTime> CREATED = createField(DSL.name("created"), Domains.TIME_STAMP.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.last_altered</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, OffsetDateTime> LAST_ALTERED = createField(DSL.name("last_altered"), Domains.TIME_STAMP.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.new_savepoint_level</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> NEW_SAVEPOINT_LEVEL = createField(DSL.name("new_savepoint_level"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.routines.is_udt_dependent</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> IS_UDT_DEPENDENT = createField(DSL.name("is_udt_dependent"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_from_data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_FROM_DATA_TYPE = createField(DSL.name("result_cast_from_data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_as_locator</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_AS_LOCATOR = createField(DSL.name("result_cast_as_locator"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_char_max_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_CHAR_MAX_LENGTH = createField(DSL.name("result_cast_char_max_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_char_octet_length</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_CHAR_OCTET_LENGTH = createField(DSL.name("result_cast_char_octet_length"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_char_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_CHAR_SET_CATALOG = createField(DSL.name("result_cast_char_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_char_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_CHAR_SET_SCHEMA = createField(DSL.name("result_cast_char_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_char_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_CHAR_SET_NAME = createField(DSL.name("result_cast_char_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_collation_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_COLLATION_CATALOG = createField(DSL.name("result_cast_collation_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_collation_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_COLLATION_SCHEMA = createField(DSL.name("result_cast_collation_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_collation_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_COLLATION_NAME = createField(DSL.name("result_cast_collation_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_NUMERIC_PRECISION = createField(DSL.name("result_cast_numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_NUMERIC_PRECISION_RADIX = createField(DSL.name("result_cast_numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_NUMERIC_SCALE = createField(DSL.name("result_cast_numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_datetime_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_DATETIME_PRECISION = createField(DSL.name("result_cast_datetime_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_interval_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_INTERVAL_TYPE = createField(DSL.name("result_cast_interval_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_interval_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_INTERVAL_PRECISION = createField(DSL.name("result_cast_interval_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_type_udt_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_TYPE_UDT_CATALOG = createField(DSL.name("result_cast_type_udt_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_type_udt_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_TYPE_UDT_SCHEMA = createField(DSL.name("result_cast_type_udt_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_type_udt_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_TYPE_UDT_NAME = createField(DSL.name("result_cast_type_udt_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_scope_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_SCOPE_CATALOG = createField(DSL.name("result_cast_scope_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_scope_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_SCOPE_SCHEMA = createField(DSL.name("result_cast_scope_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_scope_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_SCOPE_NAME = createField(DSL.name("result_cast_scope_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_maximum_cardinality</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, Integer> RESULT_CAST_MAXIMUM_CARDINALITY = createField(DSL.name("result_cast_maximum_cardinality"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.routines.result_cast_dtd_identifier</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<RoutinesRecord, String> RESULT_CAST_DTD_IDENTIFIER = createField(DSL.name("result_cast_dtd_identifier"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Routines(Name alias, Table<RoutinesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Routines(Name alias, Table<RoutinesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "routines" as SELECT (current_database())::information_schema.sql_identifier AS specific_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS specific_schema,
|
||||||
|
(nameconcatoid(p.proname, p.oid))::information_schema.sql_identifier AS specific_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS routine_catalog,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS routine_schema,
|
||||||
|
(p.proname)::information_schema.sql_identifier AS routine_name,
|
||||||
|
(
|
||||||
|
CASE p.prokind
|
||||||
|
WHEN 'f'::"char" THEN 'FUNCTION'::text
|
||||||
|
WHEN 'p'::"char" THEN 'PROCEDURE'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS routine_type,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS module_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS module_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS module_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS udt_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS udt_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS udt_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (p.prokind = 'p'::"char") THEN NULL::text
|
||||||
|
WHEN ((t.typelem <> (0)::oid) AND (t.typlen = '-1'::integer)) THEN 'ARRAY'::text
|
||||||
|
WHEN (nt.nspname = 'pg_catalog'::name) THEN format_type(t.oid, NULL::integer)
|
||||||
|
ELSE 'USER-DEFINED'::text
|
||||||
|
END)::information_schema.character_data AS data_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS character_maximum_length,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS character_octet_length,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS character_set_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS collation_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS collation_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS collation_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS datetime_precision,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS interval_precision,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nt.nspname IS NOT NULL) THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS type_udt_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS type_udt_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS type_udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS maximum_cardinality,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (p.prokind <> 'p'::"char") THEN 0
|
||||||
|
ELSE NULL::integer
|
||||||
|
END)::information_schema.sql_identifier AS dtd_identifier,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (l.lanname = 'sql'::name) THEN 'SQL'::text
|
||||||
|
ELSE 'EXTERNAL'::text
|
||||||
|
END)::information_schema.character_data AS routine_body,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN pg_has_role(p.proowner, 'USAGE'::text) THEN p.prosrc
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS routine_definition,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (l.lanname = 'c'::name) THEN p.prosrc
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS external_name,
|
||||||
|
(upper((l.lanname)::text))::information_schema.character_data AS external_language,
|
||||||
|
('GENERAL'::character varying)::information_schema.character_data AS parameter_style,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (p.provolatile = 'i'::"char") THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_deterministic,
|
||||||
|
('MODIFIES'::character varying)::information_schema.character_data AS sql_data_access,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (p.prokind <> 'p'::"char") THEN
|
||||||
|
CASE
|
||||||
|
WHEN p.proisstrict THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.yes_or_no AS is_null_call,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS sql_path,
|
||||||
|
('YES'::character varying)::information_schema.yes_or_no AS schema_level_routine,
|
||||||
|
(0)::information_schema.cardinal_number AS max_dynamic_result_sets,
|
||||||
|
(NULL::character varying)::information_schema.yes_or_no AS is_user_defined_cast,
|
||||||
|
(NULL::character varying)::information_schema.yes_or_no AS is_implicitly_invocable,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN p.prosecdef THEN 'DEFINER'::text
|
||||||
|
ELSE 'INVOKER'::text
|
||||||
|
END)::information_schema.character_data AS security_type,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS to_sql_specific_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS to_sql_specific_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS to_sql_specific_name,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS as_locator,
|
||||||
|
(NULL::timestamp with time zone)::information_schema.time_stamp AS created,
|
||||||
|
(NULL::timestamp with time zone)::information_schema.time_stamp AS last_altered,
|
||||||
|
(NULL::character varying)::information_schema.yes_or_no AS new_savepoint_level,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS is_udt_dependent,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS result_cast_from_data_type,
|
||||||
|
(NULL::character varying)::information_schema.yes_or_no AS result_cast_as_locator,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_char_max_length,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_char_octet_length,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_char_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_char_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_char_set_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_collation_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_collation_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_collation_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_numeric_precision,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_numeric_precision_radix,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_numeric_scale,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_datetime_precision,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS result_cast_interval_type,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_interval_precision,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_type_udt_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_type_udt_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_type_udt_name,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_scope_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_scope_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_scope_name,
|
||||||
|
(NULL::integer)::information_schema.cardinal_number AS result_cast_maximum_cardinality,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS result_cast_dtd_identifier
|
||||||
|
FROM (((pg_namespace n
|
||||||
|
JOIN pg_proc p ON ((n.oid = p.pronamespace)))
|
||||||
|
JOIN pg_language l ON ((p.prolang = l.oid)))
|
||||||
|
LEFT JOIN (pg_type t
|
||||||
|
JOIN pg_namespace nt ON ((t.typnamespace = nt.oid))) ON (((p.prorettype = t.oid) AND (p.prokind <> 'p'::"char"))))
|
||||||
|
WHERE (pg_has_role(p.proowner, 'USAGE'::text) OR has_function_privilege(p.oid, 'EXECUTE'::text));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routines</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Routines(String alias) {
|
||||||
|
this(DSL.name(alias), ROUTINES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.routines</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Routines(Name alias) {
|
||||||
|
this(alias, ROUTINES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.routines</code> table reference
|
||||||
|
*/
|
||||||
|
public Routines() {
|
||||||
|
this(DSL.name("routines"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Routines as(String alias) {
|
||||||
|
return new Routines(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Routines as(Name alias) {
|
||||||
|
return new Routines(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Routines as(Table<?> alias) {
|
||||||
|
return new Routines(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines rename(String name) {
|
||||||
|
return new Routines(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines rename(Name name) {
|
||||||
|
return new Routines(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines rename(Table<?> name) {
|
||||||
|
return new Routines(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines where(Condition condition) {
|
||||||
|
return new Routines(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Routines where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Routines where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Routines where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Routines where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Routines whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,257 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.SchemataRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Schemata extends TableImpl<SchemataRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.schemata</code>
|
||||||
|
*/
|
||||||
|
public static final Schemata SCHEMATA = new Schemata();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<SchemataRecord> getRecordType() {
|
||||||
|
return SchemataRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.schemata.catalog_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> CATALOG_NAME = createField(DSL.name("catalog_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.schemata.schema_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> SCHEMA_NAME = createField(DSL.name("schema_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.schemata.schema_owner</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> SCHEMA_OWNER = createField(DSL.name("schema_owner"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.schemata.default_character_set_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> DEFAULT_CHARACTER_SET_CATALOG = createField(DSL.name("default_character_set_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.schemata.default_character_set_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> DEFAULT_CHARACTER_SET_SCHEMA = createField(DSL.name("default_character_set_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.schemata.default_character_set_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> DEFAULT_CHARACTER_SET_NAME = createField(DSL.name("default_character_set_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.schemata.sql_path</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SchemataRecord, String> SQL_PATH = createField(DSL.name("sql_path"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Schemata(Name alias, Table<SchemataRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Schemata(Name alias, Table<SchemataRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "schemata" as SELECT (current_database())::information_schema.sql_identifier AS catalog_name,
|
||||||
|
(n.nspname)::information_schema.sql_identifier AS schema_name,
|
||||||
|
(u.rolname)::information_schema.sql_identifier AS schema_owner,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS default_character_set_catalog,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS default_character_set_schema,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS default_character_set_name,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS sql_path
|
||||||
|
FROM pg_namespace n,
|
||||||
|
pg_authid u
|
||||||
|
WHERE ((n.nspowner = u.oid) AND (pg_has_role(n.nspowner, 'USAGE'::text) OR has_schema_privilege(n.oid, 'CREATE, USAGE'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.schemata</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Schemata(String alias) {
|
||||||
|
this(DSL.name(alias), SCHEMATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.schemata</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Schemata(Name alias) {
|
||||||
|
this(alias, SCHEMATA);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.schemata</code> table reference
|
||||||
|
*/
|
||||||
|
public Schemata() {
|
||||||
|
this(DSL.name("schemata"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schemata as(String alias) {
|
||||||
|
return new Schemata(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schemata as(Name alias) {
|
||||||
|
return new Schemata(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schemata as(Table<?> alias) {
|
||||||
|
return new Schemata(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata rename(String name) {
|
||||||
|
return new Schemata(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata rename(Name name) {
|
||||||
|
return new Schemata(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata rename(Table<?> name) {
|
||||||
|
return new Schemata(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata where(Condition condition) {
|
||||||
|
return new Schemata(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Schemata where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Schemata where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Schemata where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Schemata where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Schemata whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,292 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.SequencesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Sequences extends TableImpl<SequencesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.sequences</code>
|
||||||
|
*/
|
||||||
|
public static final Sequences SEQUENCES = new Sequences();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<SequencesRecord> getRecordType() {
|
||||||
|
return SequencesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.sequence_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> SEQUENCE_CATALOG = createField(DSL.name("sequence_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.sequence_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> SEQUENCE_SCHEMA = createField(DSL.name("sequence_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.sequence_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> SEQUENCE_NAME = createField(DSL.name("sequence_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.data_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> DATA_TYPE = createField(DSL.name("data_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.numeric_precision</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.sequences.numeric_precision_radix</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.numeric_scale</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.start_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> START_VALUE = createField(DSL.name("start_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.minimum_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> MINIMUM_VALUE = createField(DSL.name("minimum_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.maximum_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> MAXIMUM_VALUE = createField(DSL.name("maximum_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.increment</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> INCREMENT = createField(DSL.name("increment"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sequences.cycle_option</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SequencesRecord, String> CYCLE_OPTION = createField(DSL.name("cycle_option"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Sequences(Name alias, Table<SequencesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Sequences(Name alias, Table<SequencesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "sequences" as SELECT (current_database())::information_schema.sql_identifier AS sequence_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS sequence_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS sequence_name,
|
||||||
|
(format_type(s.seqtypid, NULL::integer))::information_schema.character_data AS data_type,
|
||||||
|
(information_schema._pg_numeric_precision(s.seqtypid, '-1'::integer))::information_schema.cardinal_number AS numeric_precision,
|
||||||
|
(2)::information_schema.cardinal_number AS numeric_precision_radix,
|
||||||
|
(0)::information_schema.cardinal_number AS numeric_scale,
|
||||||
|
(s.seqstart)::information_schema.character_data AS start_value,
|
||||||
|
(s.seqmin)::information_schema.character_data AS minimum_value,
|
||||||
|
(s.seqmax)::information_schema.character_data AS maximum_value,
|
||||||
|
(s.seqincrement)::information_schema.character_data AS increment,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN s.seqcycle THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS cycle_option
|
||||||
|
FROM pg_namespace nc,
|
||||||
|
pg_class c,
|
||||||
|
pg_sequence s
|
||||||
|
WHERE ((c.relnamespace = nc.oid) AND (c.relkind = 'S'::"char") AND (NOT (EXISTS ( SELECT 1
|
||||||
|
FROM pg_depend
|
||||||
|
WHERE ((pg_depend.classid = ('pg_class'::regclass)::oid) AND (pg_depend.objid = c.oid) AND (pg_depend.deptype = 'i'::"char"))))) AND (NOT pg_is_other_temp_schema(nc.oid)) AND (c.oid = s.seqrelid) AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_sequence_privilege(c.oid, 'SELECT, UPDATE, USAGE'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sequences</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Sequences(String alias) {
|
||||||
|
this(DSL.name(alias), SEQUENCES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sequences</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public Sequences(Name alias) {
|
||||||
|
this(alias, SEQUENCES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.sequences</code> table reference
|
||||||
|
*/
|
||||||
|
public Sequences() {
|
||||||
|
this(DSL.name("sequences"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sequences as(String alias) {
|
||||||
|
return new Sequences(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sequences as(Name alias) {
|
||||||
|
return new Sequences(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Sequences as(Table<?> alias) {
|
||||||
|
return new Sequences(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences rename(String name) {
|
||||||
|
return new Sequences(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences rename(Name name) {
|
||||||
|
return new Sequences(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences rename(Table<?> name) {
|
||||||
|
return new Sequences(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences where(Condition condition) {
|
||||||
|
return new Sequences(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Sequences where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Sequences where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Sequences where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Sequences where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Sequences whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,243 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.SqlFeaturesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class SqlFeatures extends TableImpl<SqlFeaturesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.sql_features</code>
|
||||||
|
*/
|
||||||
|
public static final SqlFeatures SQL_FEATURES = new SqlFeatures();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<SqlFeaturesRecord> getRecordType() {
|
||||||
|
return SqlFeaturesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.feature_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> FEATURE_ID = createField(DSL.name("feature_id"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.feature_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> FEATURE_NAME = createField(DSL.name("feature_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.sub_feature_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> SUB_FEATURE_ID = createField(DSL.name("sub_feature_id"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.sub_feature_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> SUB_FEATURE_NAME = createField(DSL.name("sub_feature_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.is_supported</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> IS_SUPPORTED = createField(DSL.name("is_supported"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.is_verified_by</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> IS_VERIFIED_BY = createField(DSL.name("is_verified_by"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_features.comments</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlFeaturesRecord, String> COMMENTS = createField(DSL.name("comments"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private SqlFeatures(Name alias, Table<SqlFeaturesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SqlFeatures(Name alias, Table<SqlFeaturesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_features</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlFeatures(String alias) {
|
||||||
|
this(DSL.name(alias), SQL_FEATURES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_features</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlFeatures(Name alias) {
|
||||||
|
this(alias, SQL_FEATURES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.sql_features</code> table reference
|
||||||
|
*/
|
||||||
|
public SqlFeatures() {
|
||||||
|
this(DSL.name("sql_features"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFeatures as(String alias) {
|
||||||
|
return new SqlFeatures(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFeatures as(Name alias) {
|
||||||
|
return new SqlFeatures(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlFeatures as(Table<?> alias) {
|
||||||
|
return new SqlFeatures(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures rename(String name) {
|
||||||
|
return new SqlFeatures(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures rename(Name name) {
|
||||||
|
return new SqlFeatures(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures rename(Table<?> name) {
|
||||||
|
return new SqlFeatures(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures where(Condition condition) {
|
||||||
|
return new SqlFeatures(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlFeatures where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlFeatures where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlFeatures where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlFeatures where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlFeatures whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,240 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.SqlImplementationInfoRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class SqlImplementationInfo extends TableImpl<SqlImplementationInfoRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.sql_implementation_info</code>
|
||||||
|
*/
|
||||||
|
public static final SqlImplementationInfo SQL_IMPLEMENTATION_INFO = new SqlImplementationInfo();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<SqlImplementationInfoRecord> getRecordType() {
|
||||||
|
return SqlImplementationInfoRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.sql_implementation_info.implementation_info_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlImplementationInfoRecord, String> IMPLEMENTATION_INFO_ID = createField(DSL.name("implementation_info_id"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.sql_implementation_info.implementation_info_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlImplementationInfoRecord, String> IMPLEMENTATION_INFO_NAME = createField(DSL.name("implementation_info_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.sql_implementation_info.integer_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlImplementationInfoRecord, Integer> INTEGER_VALUE = createField(DSL.name("integer_value"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.sql_implementation_info.character_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlImplementationInfoRecord, String> CHARACTER_VALUE = createField(DSL.name("character_value"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.sql_implementation_info.comments</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlImplementationInfoRecord, String> COMMENTS = createField(DSL.name("comments"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private SqlImplementationInfo(Name alias, Table<SqlImplementationInfoRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SqlImplementationInfo(Name alias, Table<SqlImplementationInfoRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_implementation_info</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public SqlImplementationInfo(String alias) {
|
||||||
|
this(DSL.name(alias), SQL_IMPLEMENTATION_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_implementation_info</code>
|
||||||
|
* table reference
|
||||||
|
*/
|
||||||
|
public SqlImplementationInfo(Name alias) {
|
||||||
|
this(alias, SQL_IMPLEMENTATION_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.sql_implementation_info</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlImplementationInfo() {
|
||||||
|
this(DSL.name("sql_implementation_info"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo as(String alias) {
|
||||||
|
return new SqlImplementationInfo(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo as(Name alias) {
|
||||||
|
return new SqlImplementationInfo(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo as(Table<?> alias) {
|
||||||
|
return new SqlImplementationInfo(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo rename(String name) {
|
||||||
|
return new SqlImplementationInfo(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo rename(Name name) {
|
||||||
|
return new SqlImplementationInfo(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo rename(Table<?> name) {
|
||||||
|
return new SqlImplementationInfo(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo where(Condition condition) {
|
||||||
|
return new SqlImplementationInfo(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlImplementationInfo where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlImplementationInfo where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlImplementationInfo where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlImplementationInfo where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlImplementationInfo whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.SqlPartsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class SqlParts extends TableImpl<SqlPartsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.sql_parts</code>
|
||||||
|
*/
|
||||||
|
public static final SqlParts SQL_PARTS = new SqlParts();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<SqlPartsRecord> getRecordType() {
|
||||||
|
return SqlPartsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_parts.feature_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlPartsRecord, String> FEATURE_ID = createField(DSL.name("feature_id"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_parts.feature_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlPartsRecord, String> FEATURE_NAME = createField(DSL.name("feature_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_parts.is_supported</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlPartsRecord, String> IS_SUPPORTED = createField(DSL.name("is_supported"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_parts.is_verified_by</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlPartsRecord, String> IS_VERIFIED_BY = createField(DSL.name("is_verified_by"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_parts.comments</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlPartsRecord, String> COMMENTS = createField(DSL.name("comments"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private SqlParts(Name alias, Table<SqlPartsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SqlParts(Name alias, Table<SqlPartsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_parts</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlParts(String alias) {
|
||||||
|
this(DSL.name(alias), SQL_PARTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_parts</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlParts(Name alias) {
|
||||||
|
this(alias, SQL_PARTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.sql_parts</code> table reference
|
||||||
|
*/
|
||||||
|
public SqlParts() {
|
||||||
|
this(DSL.name("sql_parts"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlParts as(String alias) {
|
||||||
|
return new SqlParts(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlParts as(Name alias) {
|
||||||
|
return new SqlParts(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlParts as(Table<?> alias) {
|
||||||
|
return new SqlParts(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts rename(String name) {
|
||||||
|
return new SqlParts(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts rename(Name name) {
|
||||||
|
return new SqlParts(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts rename(Table<?> name) {
|
||||||
|
return new SqlParts(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts where(Condition condition) {
|
||||||
|
return new SqlParts(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlParts where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlParts where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlParts where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlParts where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlParts whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.SqlSizingRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class SqlSizing extends TableImpl<SqlSizingRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.sql_sizing</code>
|
||||||
|
*/
|
||||||
|
public static final SqlSizing SQL_SIZING = new SqlSizing();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<SqlSizingRecord> getRecordType() {
|
||||||
|
return SqlSizingRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_sizing.sizing_id</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlSizingRecord, Integer> SIZING_ID = createField(DSL.name("sizing_id"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_sizing.sizing_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlSizingRecord, String> SIZING_NAME = createField(DSL.name("sizing_name"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_sizing.supported_value</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlSizingRecord, Integer> SUPPORTED_VALUE = createField(DSL.name("supported_value"), Domains.CARDINAL_NUMBER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.sql_sizing.comments</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<SqlSizingRecord, String> COMMENTS = createField(DSL.name("comments"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private SqlSizing(Name alias, Table<SqlSizingRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SqlSizing(Name alias, Table<SqlSizingRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table(), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_sizing</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlSizing(String alias) {
|
||||||
|
this(DSL.name(alias), SQL_SIZING);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.sql_sizing</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public SqlSizing(Name alias) {
|
||||||
|
this(alias, SQL_SIZING);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.sql_sizing</code> table reference
|
||||||
|
*/
|
||||||
|
public SqlSizing() {
|
||||||
|
this(DSL.name("sql_sizing"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlSizing as(String alias) {
|
||||||
|
return new SqlSizing(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlSizing as(Name alias) {
|
||||||
|
return new SqlSizing(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SqlSizing as(Table<?> alias) {
|
||||||
|
return new SqlSizing(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing rename(String name) {
|
||||||
|
return new SqlSizing(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing rename(Name name) {
|
||||||
|
return new SqlSizing(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing rename(Table<?> name) {
|
||||||
|
return new SqlSizing(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing where(Condition condition) {
|
||||||
|
return new SqlSizing(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlSizing where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlSizing where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlSizing where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public SqlSizing where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SqlSizing whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,332 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.TableConstraintsRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class TableConstraints extends TableImpl<TableConstraintsRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.table_constraints</code>
|
||||||
|
*/
|
||||||
|
public static final TableConstraints TABLE_CONSTRAINTS = new TableConstraints();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<TableConstraintsRecord> getRecordType() {
|
||||||
|
return TableConstraintsRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.constraint_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.constraint_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.constraint_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_constraints.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.constraint_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> CONSTRAINT_TYPE = createField(DSL.name("constraint_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.is_deferrable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> IS_DEFERRABLE = createField(DSL.name("is_deferrable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.initially_deferred</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> INITIALLY_DEFERRED = createField(DSL.name("initially_deferred"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_constraints.enforced</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> ENFORCED = createField(DSL.name("enforced"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_constraints.nulls_distinct</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TableConstraintsRecord, String> NULLS_DISTINCT = createField(DSL.name("nulls_distinct"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private TableConstraints(Name alias, Table<TableConstraintsRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TableConstraints(Name alias, Table<TableConstraintsRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "table_constraints" as SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(c.conname)::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nr.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(r.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(
|
||||||
|
CASE c.contype
|
||||||
|
WHEN 'c'::"char" THEN 'CHECK'::text
|
||||||
|
WHEN 'f'::"char" THEN 'FOREIGN KEY'::text
|
||||||
|
WHEN 'p'::"char" THEN 'PRIMARY KEY'::text
|
||||||
|
WHEN 'u'::"char" THEN 'UNIQUE'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS constraint_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN c.condeferrable THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_deferrable,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN c.condeferred THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS initially_deferred,
|
||||||
|
('YES'::character varying)::information_schema.yes_or_no AS enforced,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (c.contype = 'u'::"char") THEN
|
||||||
|
CASE
|
||||||
|
WHEN ( SELECT (NOT pg_index.indnullsnotdistinct)
|
||||||
|
FROM pg_index
|
||||||
|
WHERE (pg_index.indexrelid = c.conindid)) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.yes_or_no AS nulls_distinct
|
||||||
|
FROM pg_namespace nc,
|
||||||
|
pg_namespace nr,
|
||||||
|
pg_constraint c,
|
||||||
|
pg_class r
|
||||||
|
WHERE ((nc.oid = c.connamespace) AND (nr.oid = r.relnamespace) AND (c.conrelid = r.oid) AND (c.contype <> ALL (ARRAY['t'::"char", 'x'::"char"])) AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND (NOT pg_is_other_temp_schema(nr.oid)) AND (pg_has_role(r.relowner, 'USAGE'::text) OR has_table_privilege(r.oid, 'INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(r.oid, 'INSERT, UPDATE, REFERENCES'::text)))
|
||||||
|
UNION ALL
|
||||||
|
SELECT (current_database())::information_schema.sql_identifier AS constraint_catalog,
|
||||||
|
(nr.nspname)::information_schema.sql_identifier AS constraint_schema,
|
||||||
|
(((((((nr.oid)::text || '_'::text) || (r.oid)::text) || '_'::text) || (a.attnum)::text) || '_not_null'::text))::information_schema.sql_identifier AS constraint_name,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nr.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(r.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
('CHECK'::character varying)::information_schema.character_data AS constraint_type,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS is_deferrable,
|
||||||
|
('NO'::character varying)::information_schema.yes_or_no AS initially_deferred,
|
||||||
|
('YES'::character varying)::information_schema.yes_or_no AS enforced,
|
||||||
|
(NULL::character varying)::information_schema.yes_or_no AS nulls_distinct
|
||||||
|
FROM pg_namespace nr,
|
||||||
|
pg_class r,
|
||||||
|
pg_attribute a
|
||||||
|
WHERE ((nr.oid = r.relnamespace) AND (r.oid = a.attrelid) AND a.attnotnull AND (a.attnum > 0) AND (NOT a.attisdropped) AND (r.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) AND (NOT pg_is_other_temp_schema(nr.oid)) AND (pg_has_role(r.relowner, 'USAGE'::text) OR has_table_privilege(r.oid, 'INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(r.oid, 'INSERT, UPDATE, REFERENCES'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.table_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public TableConstraints(String alias) {
|
||||||
|
this(DSL.name(alias), TABLE_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.table_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public TableConstraints(Name alias) {
|
||||||
|
this(alias, TABLE_CONSTRAINTS);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.table_constraints</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public TableConstraints() {
|
||||||
|
this(DSL.name("table_constraints"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableConstraints as(String alias) {
|
||||||
|
return new TableConstraints(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableConstraints as(Name alias) {
|
||||||
|
return new TableConstraints(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TableConstraints as(Table<?> alias) {
|
||||||
|
return new TableConstraints(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints rename(String name) {
|
||||||
|
return new TableConstraints(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints rename(Name name) {
|
||||||
|
return new TableConstraints(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints rename(Table<?> name) {
|
||||||
|
return new TableConstraints(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints where(Condition condition) {
|
||||||
|
return new TableConstraints(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TableConstraints where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TableConstraints where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TableConstraints where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TableConstraints where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TableConstraints whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,288 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.TablePrivilegesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class TablePrivileges extends TableImpl<TablePrivilegesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of
|
||||||
|
* <code>information_schema.table_privileges</code>
|
||||||
|
*/
|
||||||
|
public static final TablePrivileges TABLE_PRIVILEGES = new TablePrivileges();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<TablePrivilegesRecord> getRecordType() {
|
||||||
|
return TablePrivilegesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_privileges.grantor</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> GRANTOR = createField(DSL.name("grantor"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_privileges.grantee</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> GRANTEE = createField(DSL.name("grantee"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_privileges.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_privileges.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_privileges.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_privileges.privilege_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> PRIVILEGE_TYPE = createField(DSL.name("privilege_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.table_privileges.is_grantable</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> IS_GRANTABLE = createField(DSL.name("is_grantable"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.table_privileges.with_hierarchy</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablePrivilegesRecord, String> WITH_HIERARCHY = createField(DSL.name("with_hierarchy"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
private TablePrivileges(Name alias, Table<TablePrivilegesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TablePrivileges(Name alias, Table<TablePrivilegesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "table_privileges" as SELECT (u_grantor.rolname)::information_schema.sql_identifier AS grantor,
|
||||||
|
(grantee.rolname)::information_schema.sql_identifier AS grantee,
|
||||||
|
(current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(c.prtype)::information_schema.character_data AS privilege_type,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (pg_has_role(grantee.oid, c.relowner, 'USAGE'::text) OR c.grantable) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_grantable,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (c.prtype = 'SELECT'::text) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS with_hierarchy
|
||||||
|
FROM ( SELECT pg_class.oid,
|
||||||
|
pg_class.relname,
|
||||||
|
pg_class.relnamespace,
|
||||||
|
pg_class.relkind,
|
||||||
|
pg_class.relowner,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).grantor AS grantor,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).grantee AS grantee,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).privilege_type AS privilege_type,
|
||||||
|
(aclexplode(COALESCE(pg_class.relacl, acldefault('r'::"char", pg_class.relowner)))).is_grantable AS is_grantable
|
||||||
|
FROM pg_class) c(oid, relname, relnamespace, relkind, relowner, grantor, grantee, prtype, grantable),
|
||||||
|
pg_namespace nc,
|
||||||
|
pg_authid u_grantor,
|
||||||
|
( SELECT pg_authid.oid,
|
||||||
|
pg_authid.rolname
|
||||||
|
FROM pg_authid
|
||||||
|
UNION ALL
|
||||||
|
SELECT (0)::oid AS oid,
|
||||||
|
'PUBLIC'::name) grantee(oid, rolname)
|
||||||
|
WHERE ((c.relnamespace = nc.oid) AND (c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND (c.grantee = grantee.oid) AND (c.grantor = u_grantor.oid) AND (c.prtype = ANY (ARRAY['INSERT'::text, 'SELECT'::text, 'UPDATE'::text, 'DELETE'::text, 'TRUNCATE'::text, 'REFERENCES'::text, 'TRIGGER'::text])) AND (pg_has_role(u_grantor.oid, 'USAGE'::text) OR pg_has_role(grantee.oid, 'USAGE'::text) OR (grantee.rolname = 'PUBLIC'::name)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.table_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public TablePrivileges(String alias) {
|
||||||
|
this(DSL.name(alias), TABLE_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.table_privileges</code> table
|
||||||
|
* reference
|
||||||
|
*/
|
||||||
|
public TablePrivileges(Name alias) {
|
||||||
|
this(alias, TABLE_PRIVILEGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.table_privileges</code> table reference
|
||||||
|
*/
|
||||||
|
public TablePrivileges() {
|
||||||
|
this(DSL.name("table_privileges"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TablePrivileges as(String alias) {
|
||||||
|
return new TablePrivileges(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TablePrivileges as(Name alias) {
|
||||||
|
return new TablePrivileges(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TablePrivileges as(Table<?> alias) {
|
||||||
|
return new TablePrivileges(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges rename(String name) {
|
||||||
|
return new TablePrivileges(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges rename(Name name) {
|
||||||
|
return new TablePrivileges(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges rename(Table<?> name) {
|
||||||
|
return new TablePrivileges(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges where(Condition condition) {
|
||||||
|
return new TablePrivileges(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TablePrivileges where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TablePrivileges where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TablePrivileges where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public TablePrivileges where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public TablePrivileges whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,306 @@
|
|||||||
|
/*
|
||||||
|
* This file is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
package dev.struchkov.network.data.jooq.schema.information_schema.tables;
|
||||||
|
|
||||||
|
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.Domains;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.InformationSchema;
|
||||||
|
import dev.struchkov.network.data.jooq.schema.information_schema.tables.records.TablesRecord;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import org.jooq.Condition;
|
||||||
|
import org.jooq.Field;
|
||||||
|
import org.jooq.Name;
|
||||||
|
import org.jooq.PlainSQL;
|
||||||
|
import org.jooq.QueryPart;
|
||||||
|
import org.jooq.SQL;
|
||||||
|
import org.jooq.Schema;
|
||||||
|
import org.jooq.Select;
|
||||||
|
import org.jooq.Stringly;
|
||||||
|
import org.jooq.Table;
|
||||||
|
import org.jooq.TableField;
|
||||||
|
import org.jooq.TableOptions;
|
||||||
|
import org.jooq.impl.DSL;
|
||||||
|
import org.jooq.impl.TableImpl;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is generated by jOOQ.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings({ "all", "unchecked", "rawtypes", "this-escape" })
|
||||||
|
public class Tables extends TableImpl<TablesRecord> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The reference instance of <code>information_schema.tables</code>
|
||||||
|
*/
|
||||||
|
public static final Tables TABLES = new Tables();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The class holding records for this type
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Class<TablesRecord> getRecordType() {
|
||||||
|
return TablesRecord.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.table_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.table_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.table_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> TABLE_NAME = createField(DSL.name("table_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.table_type</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> TABLE_TYPE = createField(DSL.name("table_type"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.tables.self_referencing_column_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> SELF_REFERENCING_COLUMN_NAME = createField(DSL.name("self_referencing_column_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.reference_generation</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> REFERENCE_GENERATION = createField(DSL.name("reference_generation"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.tables.user_defined_type_catalog</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> USER_DEFINED_TYPE_CATALOG = createField(DSL.name("user_defined_type_catalog"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column
|
||||||
|
* <code>information_schema.tables.user_defined_type_schema</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> USER_DEFINED_TYPE_SCHEMA = createField(DSL.name("user_defined_type_schema"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.user_defined_type_name</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> USER_DEFINED_TYPE_NAME = createField(DSL.name("user_defined_type_name"), Domains.SQL_IDENTIFIER.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.is_insertable_into</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> IS_INSERTABLE_INTO = createField(DSL.name("is_insertable_into"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.is_typed</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> IS_TYPED = createField(DSL.name("is_typed"), Domains.YES_OR_NO.getDataType(), this, "");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The column <code>information_schema.tables.commit_action</code>.
|
||||||
|
*/
|
||||||
|
public final TableField<TablesRecord, String> COMMIT_ACTION = createField(DSL.name("commit_action"), Domains.CHARACTER_DATA.getDataType(), this, "");
|
||||||
|
|
||||||
|
private Tables(Name alias, Table<TablesRecord> aliased) {
|
||||||
|
this(alias, aliased, (Field<?>[]) null, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Tables(Name alias, Table<TablesRecord> aliased, Field<?>[] parameters, Condition where) {
|
||||||
|
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
|
||||||
|
create view "tables" as SELECT (current_database())::information_schema.sql_identifier AS table_catalog,
|
||||||
|
(nc.nspname)::information_schema.sql_identifier AS table_schema,
|
||||||
|
(c.relname)::information_schema.sql_identifier AS table_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (nc.oid = pg_my_temp_schema()) THEN 'LOCAL TEMPORARY'::text
|
||||||
|
WHEN (c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) THEN 'BASE TABLE'::text
|
||||||
|
WHEN (c.relkind = 'v'::"char") THEN 'VIEW'::text
|
||||||
|
WHEN (c.relkind = 'f'::"char") THEN 'FOREIGN'::text
|
||||||
|
ELSE NULL::text
|
||||||
|
END)::information_schema.character_data AS table_type,
|
||||||
|
(NULL::name)::information_schema.sql_identifier AS self_referencing_column_name,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS reference_generation,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (t.typname IS NOT NULL) THEN current_database()
|
||||||
|
ELSE NULL::name
|
||||||
|
END)::information_schema.sql_identifier AS user_defined_type_catalog,
|
||||||
|
(nt.nspname)::information_schema.sql_identifier AS user_defined_type_schema,
|
||||||
|
(t.typname)::information_schema.sql_identifier AS user_defined_type_name,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN ((c.relkind = ANY (ARRAY['r'::"char", 'p'::"char"])) OR ((c.relkind = ANY (ARRAY['v'::"char", 'f'::"char"])) AND ((pg_relation_is_updatable((c.oid)::regclass, false) & 8) = 8))) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_insertable_into,
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
WHEN (t.typname IS NOT NULL) THEN 'YES'::text
|
||||||
|
ELSE 'NO'::text
|
||||||
|
END)::information_schema.yes_or_no AS is_typed,
|
||||||
|
(NULL::character varying)::information_schema.character_data AS commit_action
|
||||||
|
FROM ((pg_namespace nc
|
||||||
|
JOIN pg_class c ON ((nc.oid = c.relnamespace)))
|
||||||
|
LEFT JOIN (pg_type t
|
||||||
|
JOIN pg_namespace nt ON ((t.typnamespace = nt.oid))) ON ((c.reloftype = t.oid)))
|
||||||
|
WHERE ((c.relkind = ANY (ARRAY['r'::"char", 'v'::"char", 'f'::"char", 'p'::"char"])) AND (NOT pg_is_other_temp_schema(nc.oid)) AND (pg_has_role(c.relowner, 'USAGE'::text) OR has_table_privilege(c.oid, 'SELECT, INSERT, UPDATE, DELETE, TRUNCATE, REFERENCES, TRIGGER'::text) OR has_any_column_privilege(c.oid, 'SELECT, INSERT, UPDATE, REFERENCES'::text)));
|
||||||
|
"""), where);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.tables</code> table reference
|
||||||
|
*/
|
||||||
|
public Tables(String alias) {
|
||||||
|
this(DSL.name(alias), TABLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an aliased <code>information_schema.tables</code> table reference
|
||||||
|
*/
|
||||||
|
public Tables(Name alias) {
|
||||||
|
this(alias, TABLES);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a <code>information_schema.tables</code> table reference
|
||||||
|
*/
|
||||||
|
public Tables() {
|
||||||
|
this(DSL.name("tables"), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Schema getSchema() {
|
||||||
|
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Tables as(String alias) {
|
||||||
|
return new Tables(DSL.name(alias), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Tables as(Name alias) {
|
||||||
|
return new Tables(alias, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Tables as(Table<?> alias) {
|
||||||
|
return new Tables(alias.getQualifiedName(), this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables rename(String name) {
|
||||||
|
return new Tables(DSL.name(name), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables rename(Name name) {
|
||||||
|
return new Tables(name, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rename this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables rename(Table<?> name) {
|
||||||
|
return new Tables(name.getQualifiedName(), null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables where(Condition condition) {
|
||||||
|
return new Tables(getQualifiedName(), aliased() ? this : null, null, condition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables where(Collection<? extends Condition> conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables where(Condition... conditions) {
|
||||||
|
return where(DSL.and(conditions));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables where(Field<Boolean> condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Tables where(SQL condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Tables where(@Stringly.SQL String condition) {
|
||||||
|
return where(DSL.condition(condition));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Tables where(@Stringly.SQL String condition, Object... binds) {
|
||||||
|
return where(DSL.condition(condition, binds));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@PlainSQL
|
||||||
|
public Tables where(@Stringly.SQL String condition, QueryPart... parts) {
|
||||||
|
return where(DSL.condition(condition, parts));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables whereExists(Select<?> select) {
|
||||||
|
return where(DSL.exists(select));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an inline derived table from this table
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Tables whereNotExists(Select<?> select) {
|
||||||
|
return where(DSL.notExists(select));
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user