Skip to content

Commit

Permalink
Specify that the library is available in Maven Central, refactor README
Browse files Browse the repository at this point in the history
  • Loading branch information
saharNooby committed Dec 26, 2021
1 parent ce212e3 commit f1f0c51
Showing 1 changed file with 36 additions and 16 deletions.
52 changes: 36 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,35 @@ Query.select("value")

You can see more examples in [EXAMPLES.md](https://github.com/saharNooby/query-lib/blob/master/EXAMPLES.md).

## How to use
## How to Use

### Add as a dependency

This library is available in Maven Central.

#### Maven

```xml
<dependency>
<groupId>me.saharnooby.lib</groupId>
<artifactId>query-lib</artifactId>
<version>1.2.0</version>
</dependency>
```

#### Gradle

```groovy
dependencies {
implementation 'me.saharnooby.lib:query-lib:1.2.0'
}
```

#### Other build systems

You can download prebuilt JARs from [GitHub releases](https://github.com/saharNooby/query-lib/releases) or build them yourself.

### Usage

Use any of the static methods of `me.saharnooby.lib.query.query.Query` to
obtain an `AbstractQuery` object, then you can specify some values and
Expand All @@ -54,20 +82,12 @@ specified mapper functions.
To build and execute a batch of queries, create `me.saharnooby.lib.query.batch.BatchBuilder`,
call `add` as many times as needed, then `execute`.

## Build

To build, you need Maven and JDK 8.

`git clone` the repository, `cd` into its dir and run `mvn clean install`.

## Using as a dependency
## Building

To add as a Maven dependency:
You will need Git, Maven and JDK 8 or higher.

```xml
<dependency>
<groupId>me.saharnooby.lib</groupId>
<artifactId>query-lib</artifactId>
<version>1.2.0</version>
</dependency>
```
```shell
git clone https://github.com/saharNooby/query-lib.git
cd query-lib
mvn clean install
```

0 comments on commit f1f0c51

Please sign in to comment.