comparison src/main/kotlin/name/blackcap/passman/Database.kt @ 15:0fc90892a3ae

Add password subcommand.
author David Barts <n5jrn@me.com>
date Fri, 03 Feb 2023 18:48:13 -0800
parents c69665ff37d0
children 7a74ae668665
comparison
equal deleted inserted replaced
14:4dae7a15ee48 15:0fc90892a3ae
147 if (value == null) { 147 if (value == null) {
148 setNull(columnIndex, Types.INTEGER) 148 setNull(columnIndex, Types.INTEGER)
149 } else { 149 } else {
150 setLong(columnIndex, value) 150 setLong(columnIndex, value)
151 } 151 }
152
153 fun PreparedStatement.setDateOrNull(parameterIndex: Int, value: Long?) {
154 if (value == null || value == 0L) {
155 setNull(parameterIndex, Types.INTEGER)
156 } else {
157 setLong(parameterIndex, value)
158 }
159 }