Skip to content

Commit

Permalink
Merge pull request #22 from rajadilipkolli/master
Browse files Browse the repository at this point in the history
adds Hibernate 6 example
  • Loading branch information
rajadilipkolli committed Jul 8, 2023
2 parents 67e2101 + 9bda75f commit a87367e
Show file tree
Hide file tree
Showing 25 changed files with 1,502 additions and 24 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/hibernate-5-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: hibernate-5-example

on:
push:
paths:
- "hibernate-5-example/**"
branches: [master]
pull_request:
paths:
- "hibernate-5-example/**"
types:
- opened
- synchronize
- reopened

jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: "hibernate-5-example"
strategy:
matrix:
distribution: [ 'temurin' ]
java: [ '17' ]
steps:
- uses: actions/checkout@v3

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
cache: 'maven'

- name: Build with Maven
run: ./mvnw clean verify
38 changes: 38 additions & 0 deletions .github/workflows/hibernate-6-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: hibernate-6-example

on:
push:
paths:
- "hibernate-6-example/**"
branches: [master]
pull_request:
paths:
- "hibernate-6-example/**"
types:
- opened
- synchronize
- reopened

jobs:
build:
name: Build
runs-on: ubuntu-latest
defaults:
run:
working-directory: "hibernate-6-example"
strategy:
matrix:
distribution: [ 'temurin' ]
java: [ '17' ]
steps:
- uses: actions/checkout@v3

- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
cache: 'maven'

- name: Build with Maven
run: ./mvnw clean verify
6 changes: 6 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ tasks:
- init: ./mvnw install -DskipTests=false



vscode:
extensions:
- vscjava.vscode-java-pack


2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ Requires Java 17 to compile.
[**spring-xml-example**](spring-xml-example/README.md)
- programmatic `ProxyDataSource` creation

[**Hibernate-example**](hibernate-example)
[**Hibernate-5-example**](hibernate-5-example/README.md)
- programmatic `ProxyDataSource` creation

[**Hibernate-6-example**](hibernate-6-example/README.md)
- programmatic `ProxyDataSource` creation

[**springboot-autoconfig-example**](springboot-autoconfig-example/README.md)
Expand Down
File renamed without changes.
Binary file not shown.
18 changes: 18 additions & 0 deletions hibernate-5-example/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
40 changes: 40 additions & 0 deletions hibernate-5-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# About

**This example project demonstrates:**
- programmatic `ProxyDataSource` creation using `ProxyDataSourceBuilder`.
- hibernate 5

---

**Output example**

```
Name:ProxyDataSource, Connection:2, Time:1, Success:True
Type:Statement, Batch:False, QuerySize:1, BatchSize:0
Query:["
drop table Application$Usertable if exists"]
Params:[]
Name:ProxyDataSource, Connection:3, Time:5, Success:True
Type:Statement, Batch:False, QuerySize:1, BatchSize:0
Query:["
create table "Application$Usertable" (id integer not null, name varchar(255) not null, primary key (id))"]
Params:[]
Name:ProxyDataSource, Connection:4, Time:6, Success:True
Type:Prepared, Batch:True, QuerySize:1, BatchSize:3
Query:["
insert
into
"Application$Usertable"
(name,id)
values
(?,?)"]
Params:[(foo,1),(bar,2),(tar,3)]
Name:ProxyDataSource, Connection:5, Time:1, Success:True
Type:Statement, Batch:False, QuerySize:1, BatchSize:0
Query:["
drop table Application$Usertable if exists "]
Params:[]
```
Loading

0 comments on commit a87367e

Please sign in to comment.