Coder Social home page Coder Social logo

jdbc-client's Introduction

Jdbc-client Project

this interface is the implementation of JpaRepository of Spring Data And JPA and generic specifications of Spring Data JPA to query any parameter, you can find know about it in {@link <a https://spring.io/projects/spring-data-jpa} you must create an interface and extended of it then generate a bean of your interface and use all method that Spring Data implement it And then you Access the Spring Data Query Method and Used It in your Interface

Requirement

The library works with Java 8+, ladder Core 1.0.1+ and implemented Crud Project

To Use this library in your project add dependencies in maven:

<dependency>
    <groupId>app.ladderproject</groupId>
    <artifactId>crud</artifactId>
    <version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>app.ladderproject</groupId>
<artifactId>Jdbc-client</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

$ git clone https://github.com/nimamoosavi/jdbc-client.git $ cd jdbc-clients $ mvn clean install

Operations

This table shows a list of the current supported operations.

Operation Code
equal EQUALS
not equal NOT_EQUALS
greater than GREATER_THAN
greater than or equal to GREATER_OR_EQUALS
less than LESS_THAN
less than or equal to LESS_OR_EQUALS
in CONTAINS
start with GREATER_THAN
end with END_WITH
not contain NOT_CONTAIN
not start with NOT_START_WITH
not end with NOT_END_WITH
blank BLANK
not blank NOT_BLANK
null NULL
not null NOT_NULL

Implementation

Using criteria object

To be able to custom filter you must just extend from our JdbcRepository:

@Repository
import app.ladderproject.sample.domain.entity.User;
        import app.ladderproject.jdbcclient.repository.JdbcRepository;
        import org.springframework.stereotype.Repository;

public interface UserRepository extends JdbcRepository<User, Long> {
}

if you extend from BaseController then call http://localhost:8080/sample/v1/users/all/query and set data in body:

{
  "criteria": {
    "operator": "EQUALS",
    "fieldName": "name",
    "value": "John"
  },
  "sorts": [
    "name",
    "lastName"
  ]
}

TODOs

  • add operation for check operation like equality between two field
  • add condition on object like user.userInfo.age > 10

Sample Project

this project used Crud Project And Jdbc Project And Core And ...

jdbc-client's People

Contributors

graypharos avatar hosseinmahdevar avatar nimamoosavi avatar seyyedbaghermusavi avatar

Stargazers

 avatar

Watchers

 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.