gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libeufin] branch master updated: database scaffolding


From: gnunet
Subject: [GNUnet-SVN] [libeufin] branch master updated: database scaffolding
Date: Tue, 24 Sep 2019 00:21:14 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new da813ed  database scaffolding
da813ed is described below

commit da813ed4892f2ee33495dba89453efeb8bb17255
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Sep 24 00:21:07 2019 +0200

    database scaffolding
---
 build.gradle                        |  1 +
 src/main/kotlin/Main.kt             |  2 ++
 src/main/kotlin/tech/libeufin/DB.kt | 17 +++++++++++++++++
 3 files changed, 20 insertions(+)

diff --git a/build.gradle b/build.gradle
index a00380e..4cd1b12 100644
--- a/build.gradle
+++ b/build.gradle
@@ -15,6 +15,7 @@ repositories {
 
 dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
+    compile "org.jetbrains.exposed:exposed:0.17.3"
     compile "io.ktor:ktor-server-netty:1.2.4"
     compile "ch.qos.logback:logback-classic:1.2.3"
     compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
diff --git a/src/main/kotlin/Main.kt b/src/main/kotlin/Main.kt
index 068e990..cfd0bfd 100644
--- a/src/main/kotlin/Main.kt
+++ b/src/main/kotlin/Main.kt
@@ -29,9 +29,11 @@ import io.ktor.server.netty.*
 import tech.libeufin.messages.HEVResponse
 import tech.libeufin.messages.HEVResponseDataType
 import tech.libeufin.messages.ProtocolAndVersion
+import tech.libeufin.tech.libeufin.db
 import javax.xml.bind.JAXBElement
 
 fun main(args: Array<String>) {
+
     var xmlProcess = XMLManagement();
     var logger = getLogger()
 
diff --git a/src/main/kotlin/tech/libeufin/DB.kt 
b/src/main/kotlin/tech/libeufin/DB.kt
new file mode 100644
index 0000000..257b233
--- /dev/null
+++ b/src/main/kotlin/tech/libeufin/DB.kt
@@ -0,0 +1,17 @@
+package tech.libeufin.tech.libeufin
+
+import org.jetbrains.exposed.dao.IntIdTable
+import org.jetbrains.exposed.sql.*
+import org.jetbrains.exposed.sql.transactions.transaction
+
+object SignKeys: IntIdTable(){
+    val pub = binary("pub", 50)
+}
+
+fun db() {
+    Database.connect("jdbc:h2:mem:test", driver = "org.h2.Driver")
+    transaction {
+        addLogger(StdOutSqlLogger)
+        SchemaUtils.create(SignKeys)
+    }
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]