Implement begining of migration

Move Function/Query definition
This commit is contained in:
2019-06-28 15:52:05 +02:00
parent bfefcac88d
commit ebc1a67420
18 changed files with 378 additions and 78 deletions

View File

@@ -0,0 +1,34 @@
package fr.postgresjson.definition
interface ParameterI {
val name: String
val type: String
val direction: Parameter.Direction
val default: String
}
class Parameter(val name: String, val type: String, direction: Direction? = Direction.IN, val default: Any? = null)
{
val direction: Direction
init {
if (direction === null) {
this.direction = Direction.IN
} else {
this.direction = direction
}
}
constructor(name: String, type: String, direction: String? = "IN", default: Any? = null) : this(
name = name,
type = type,
direction = direction?.let { Direction.valueOf(direction.toUpperCase())},
default = default
)
enum class Direction { IN, OUT, INOUT }
}
interface ParametersInterface {
val parameters: List<Parameter>
}