Size: 366
Comment:
|
Size: 1251
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 5: | Line 5: |
There is also a [JDBC driver|https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc/3.28.0] for it and it's JPA compliant. | There is also a [[https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc/3.28.0|JDBC driver]] for it ([[https://github.com/xerial/sqlite-jdbc|Github source code]]) and it's JPA compliant. A JDBC sample URL for a BD stored in sample.db file is {{{ jdbc:sqlite:sample.db }}} * apt install sqlite3 * sqlite3 test.db * select * from cars; == Spring notes == pom.xml {{{ <dependency> <groupId>com.zsoltfabok</groupId> <artifactId>sqlite-dialect</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>org.xerial</groupId> <artifactId>sqlite-jdbc</artifactId> <version>3.28.0</version> </dependency> }}} application.properties {{{ spring.datasource.url=jdbc:sqlite:/tmp/test.db spring.datasource.driverClassName=org.sqlite.JDBC spring.datasource.username=sa spring.datasource.password=???????? spring.jpa.database-platform=org.hibernate.dialect.SQLiteDialect spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.show-sql=true }}} |
sqlite
SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world.
There is also a JDBC driver for it (Github source code) and it's JPA compliant.
A JDBC sample URL for a BD stored in sample.db file is
jdbc:sqlite:sample.db
- apt install sqlite3
- sqlite3 test.db
- select * from cars;
Spring notes
pom.xml
<dependency> <groupId>com.zsoltfabok</groupId> <artifactId>sqlite-dialect</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>org.xerial</groupId> <artifactId>sqlite-jdbc</artifactId> <version>3.28.0</version> </dependency>
application.properties
spring.datasource.url=jdbc:sqlite:/tmp/test.db spring.datasource.driverClassName=org.sqlite.JDBC spring.datasource.username=sa spring.datasource.password=???????? spring.jpa.database-platform=org.hibernate.dialect.SQLiteDialect spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.show-sql=true