monalisa-service

Very simple database service

Лицензия

Лицензия

Группа

Группа

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

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

monalisa-service
Последняя версия

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

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

monalisa-service
Very simple database service
Ссылка на сайт

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

https://github.com/11039850/monalisa-service
Организация-разработчик

Организация-разработчик

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

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

https://github.com/11039850/monalisa-service.git

Скачать monalisa-service

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

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

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.tsc9526 : monalisa-orm jar 2.0.0

provided (2)

Идентификатор библиотеки Тип Версия
javax.servlet : javax.servlet-api jar 3.1.0
org.mockito : mockito-all jar 1.8.5

test (4)

Идентификатор библиотеки Тип Версия
org.testng : testng jar 6.9.9
org.springframework : spring-test jar 4.3.2.RELEASE
org.springframework : spring-web jar 4.3.2.RELEASE
log4j : log4j jar 1.2.16

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

Данный проект не имеет модулей.

monalisa-service

Simple database http serivce.

image

Step 1: Write an interface or class

    @DB(url="jdbc:mysql://127.0.0.1:3306/test" ,username="root", password="root", 
        dbs="testdb", dbsAuthUsers="none")
    public interface TestDB {
    	public static DBConfig DB=DBConfig.fromClass(TestDB.class); 
    }

Step 2: Start web server

Step 3: Access database as following

Get all tables:

  curl -X HEAD http://localhost:8080/your_web_app/dbs/testdb

OR (Use parameter: method=HEAD )

  curl http://localhost:8080/your_web_app/dbs/testdb?method=HEAD

Get table metadata:

  curl -X HEAD http://localhost:8080/your_web_app/dbs/testdb/your_table_name

Select:

  curl http://localhost:8080/your_web_app/dbs/testdb/your_table_name

OR (Select multi-tables), click here for more query parameters.

  curl http://localhost:8080/your_web_app/dbs/testdb/table1,table2/table1.id=table2.id

Insert:

  curl -X POST -d "name=zzg&password=123456" http://localhost:8080/your_web_app/dbs/testdb/your_table_name

OR (Insert multi-tables)

  curl -X POST -d "table1.name=zzg&table2.name=xxx" http://localhost:8080/your_web_app/dbs/testdb/table1,table2

Update:

  curl -X PUT -d "name=zzg&password=1" http://localhost:8080/your_web_app/dbs/testdb/your_table_name/id

OR (Update by multi-keys)

  curl -X PUT -d "name=zzg&password=1" http://localhost:8080/your_web_app/dbs/testdb/your_table_name/id1=1,id2=2

Delete:

  curl -X DELETE http://localhost:8080/your_web_app/dbs/testdb/your_table_name/id

OR (Delete by multi-keys)

  curl -X DELETE http://localhost:8080/your_web_app/dbs/testdb/your_table_name/id1=1,id2=2

Maven:

	<dependency>
		<groupId>com.tsc9526</groupId>
		<artifactId>monalisa-service</artifactId>
		<version>2.0.0</version>
	</dependency>

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

Версия
2.0.0