Skip to content

Instantly share code, notes, and snippets.

View juarezjuniorgithub's full-sized avatar

Juarez Barbosa Junior juarezjuniorgithub

View GitHub Profile
@juarezjuniorgithub
juarezjuniorgithub / JDBCStoredProcHqEmployee.java
Created September 16, 2023 18:54
JDBCStoredProcHqEmployee.java (code sample) - The new BOOLEAN data type in Oracle Database 23c with PL/SQL and the JDBC Drivers (21c, 23c) @ OracleDevs on Medium.com
/*
Copyright (c) 2022, 2023, Oracle and/or its affiliates.
This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License
2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
either license.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
package com.oracle.dev.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import oracle.jdbc.pool.OracleDataSource;
public class QueryWithBooleanDataTypeColumn {
package com.oracle.dev.jdbc;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.concurrent.ThreadLocalRandom;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.slf4j.Logger;
package com.oracle.dev.jdbc;
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.json.JsonObject;
@juarezjuniorgithub
juarezjuniorgithub / App.java
Created May 2, 2023 11:48
Connecting to your Oracle Database 23c Free — Developer Release instance from a Java application with JDBC
/*
Copyright (c) 2021, 2023, Oracle and/or its affiliates.
This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License
2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
either license.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@juarezjuniorgithub
juarezjuniorgithub / odsa-spring.yaml
Created January 11, 2023 20:21
odsa-spring.yaml
apiVersion: v1
kind: Pod
metadata:
name: odsa-spring
spec:
containers:
- name: odsa-spring
image: orclacregistry.azurecr.io/odsa-spring:v1
imagePullSecrets:
- name: acr-secret
package com.oracle.dev.jdbc;
import java.io.IOException;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;
@juarezjuniorgithub
juarezjuniorgithub / JdbcFunction.java
Created December 23, 2022 18:31
JDBC Function (Azure Function)
package com.oracle.dev.jdbc;
import java.sql.SQLException;
import java.util.Map;
import java.util.Optional;
import com.microsoft.azure.functions.ExecutionContext;
import com.microsoft.azure.functions.HttpMethod;
import com.microsoft.azure.functions.HttpRequestMessage;
import com.microsoft.azure.functions.HttpResponseMessage;
@juarezjuniorgithub
juarezjuniorgithub / Dockerfile
Created December 14, 2022 16:41
odsa-spring - Dockerfile
FROM openjdk:17
COPY target/odsa-spring-0.0.1-SNAPSHOT.jar /app.jar
EXPOSE 8080
CMD ["java", "-jar", "app.jar"]

Source

Vim Commands Cheat Sheet


How to Exit

:q[uit]