Json4orm Parent

Json4orm introduces standard to map relational database tables and SQL queries using JSON objects. It offers APIs to query data based on JSON orm mappings and queries.

Лицензия

Лицензия

Категории

Категории

JSON Данные ORM
Группа

Группа

com.json4orm
Идентификатор

Идентификатор

json4orm-parent
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

pom
Описание

Описание

Json4orm Parent
Json4orm introduces standard to map relational database tables and SQL queries using JSON objects. It offers APIs to query data based on JSON orm mappings and queries.
Ссылка на сайт

Ссылка на сайт

http://www.json4orm.com/
Система контроля версий

Система контроля версий

https://github.com/xianhua/json4orm

Скачать json4orm-parent

Имя Файла Размер
json4orm-parent-1.0.1.pom 7 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.json4orm/json4orm-parent/ -->
<dependency>
    <groupId>com.json4orm</groupId>
    <artifactId>json4orm-parent</artifactId>
    <version>1.0.1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.json4orm/json4orm-parent/
implementation 'com.json4orm:json4orm-parent:1.0.1'
// https://jarcasting.com/artifacts/com.json4orm/json4orm-parent/
implementation ("com.json4orm:json4orm-parent:1.0.1")
'com.json4orm:json4orm-parent:pom:1.0.1'
<dependency org="com.json4orm" name="json4orm-parent" rev="1.0.1">
  <artifact name="json4orm-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.json4orm', module='json4orm-parent', version='1.0.1')
)
libraryDependencies += "com.json4orm" % "json4orm-parent" % "1.0.1"
[com.json4orm/json4orm-parent "1.0.1"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.apache.logging.log4j : log4j-api jar 2.12.1
org.apache.logging.log4j : log4j-core jar 2.12.1

test (10)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-all jar 1.10.19
org.powermock : powermock-core jar 1.7.4
org.powermock : powermock-api-mockito jar 1.7.4
org.powermock : powermock-api-support jar 1.7.4
org.powermock : powermock-classloading-xstream jar 1.7.4
org.powermock : powermock-module-junit4 jar 1.7.4
org.powermock : powermock-module-junit4-rule jar 1.7.4
org.powermock : powermock-module-junit4-rule-agent jar 1.7.4
xmlunit : xmlunit jar 1.6

Модули Проекта

  • json4orm-core
  • json4orm-db
  • json4orm-web

Json4orm

Motivation

Make data in relational database searchable online and deliverable with customizable format, without programming.

Main Features

  • Support defining database object-relational mappings (ORMs) in JSON
  • Support defining database queries in JSON with customized fields to return as result
  • Support database query engine to execute queries defined in JSON based on ORMs defined in JSON

Quick Example

Entity Mapping

Student

#student.json
{
  name: "Student",
  table: "student",
  properties: [
    {
      name: "studentId",
      type: "ID",
      column: "student_id"
    },
    {
      name: "firstName",
      type: "string",
      column: "first_name"
    },
    {
      name: "lastName",
      type: "string",
      column: "last_name"
    },
    {
      name: "middleName",
      type: "string",
      column: "middle_name"
    },
    {
      name: "birthDate",
      type: "date",
      column: "birth_date"
    },
    {
      name: "createdAt",
      type: "timestamp",
      column: "created_at"
    }
  ]
}

Class

{
  name: "Class",
  table: "class",
  properties: [
    {
      name: "classId",
      type: "ID",
      column: "class_id"
    },
    {
      name: "name",
      type: "string",
      column: "name"
    },
    {
      name: "createdAt",
      type: "timestamp",
      column: "created_at"
    },
    {
      name: "classStudents",
      type: "list",
      column: "class_id",
      itemType: "ClassStudent"
    }
  ]
}

ClassStudent

{
  name: "ClassStudent",
  table: "class_student",
  properties: [
    {
      name: "classStudentId",
      type: "ID",
      column: "class_student_id"
    },
    {
      name: "class",
      type: "Class",
      column: "class_id"
    },
    {
      name: "student",
      type: "Student",
      column: "student_id"
    },
    {
      name: "score",
      type: "float",
      column: "score"
    },
    {
      name: "createdAt",
      type: "timestamp",
      column: "created_at"
    }
  ]
}

Query in Json

{
  queryFor: "Student",
  filter: {
    and: [
      {
         firstName: "John"
      },
      {
        "classStudents.class.name": {
           in: ["Math","English","History"]
        } 
      }
    ]   
  },
  result: {
    Student: {
      properties: ["firstName", "lastName","birthDate"],
      classStudents: {
        properties: ["classStudentId", "score"],
        class: ["name"]
      }
    }  
  }
}

User Guide and API Guide

Please visit http://json4orm.com for user guide and API guide.

Версии библиотеки

Версия
1.0.1
1.0.0