comparison src/main/kotlin/name/blackcap/passman/Database.kt @ 19:7d80cbcb67bb

add shlex-style splitter and tests
author David Barts <n5jrn@me.com>
date Sun, 30 Jun 2024 20:37:36 -0700
parents 7a74ae668665
children ea65ab890f66
comparison
equal deleted inserted replaced
18:8f3ddebb4295 19:7d80cbcb67bb
50 } 50 }
51 51
52 private fun init(connection: Connection, masterPassword: CharArray): Encryption { 52 private fun init(connection: Connection, masterPassword: CharArray): Encryption {
53 try { 53 try {
54 connection.createStatement().use { stmt -> 54 connection.createStatement().use { stmt ->
55 stmt.executeUpdate("create table integers ( name string not null, value integer )") 55 stmt.executeUpdate("create table integers ( name text not null, value integer )")
56 stmt.executeUpdate("create table reals ( name string not null, value integer )") 56 stmt.executeUpdate("create table reals ( name text not null, value real )")
57 stmt.executeUpdate("create table strings ( name string not null, value real )") 57 stmt.executeUpdate("create table strings ( name text not null, value text )")
58 stmt.executeUpdate("create table blobs ( name string not null, value blob )") 58 stmt.executeUpdate("create table blobs ( name text not null, value blob )")
59 stmt.executeUpdate( 59 stmt.executeUpdate(
60 "create table passwords (" + 60 "create table passwords (" +
61 "id integer not null primary key, " + 61 "id integer not null primary key, " +
62 "name blob not null, " + 62 "name blob not null, " +
63 "username blob not null, " + 63 "username blob not null, " +