Giter Site home page Giter Site logo

oracle-jsonview-demo-app's Introduction

This is an example application for Micronaut Data using an Oracle JSON Duality View.

It uses a test container with the container image "gvenzl/oracle-free:latest-faststart" by default and then the datasource configuration is taken from the container before starting Micronaut application context.

Note: To run the application you need a Docker-API compatible container runtime such as Docker, Podman, or Rancher Desktop installed and running.

To get started, run the application as follows:

./gradlew run

Wait until the application has started and created the database schema.

Test the application by using curl to call the API.

  1. List all the students and their schedules:

    curl http://localhost:8080/students
  2. Retrieve a schedule by student name:

    curl http://localhost:8080/students/student/Jill
  3. Retrieve a schedule by student id:

    curl http://localhost:8080/students/3
  4. Create a new student with courses (and view that student's schedule):

    curl -d '{"student":"Sandro", "averageGrade":8.9, "courses": ["Math", "English"]}' \
    -H "Content-Type: application/json" \
    -X POST http://localhost:8080/students
  5. Update a student's average grade (by student id):

    curl -X PUT http://localhost:8080/students/1/average_grade/9.8
  6. Retrieve the maximum average grade:

    curl http://localhost:8080/students/max_average_grade
  7. Update a student's name (by student id), for example, to correct a typo:

    curl -X PUT http://localhost:8080/students/1/student/Dennis
  8. Delete a student by student id and retrieve the new maximum average grade (to confirm deletion):

    curl -X DELETE http://localhost:8080/students/1
    curl http://localhost:8080/students/max_average_grade

oracle-jsonview-demo-app's People

Contributors

graemerocher avatar bhoran avatar radovanradic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.