This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP PROCEDURE IF EXISTS migrateById; | |
DELIMITER $$ | |
CREATE PROCEDURE migrateById() | |
BEGIN | |
DECLARE done INT DEFAULT FALSE; | |
DECLARE _post_id INT; | |
DECLARE migrate_ids CURSOR FOR | |
# modify the select statement to returns IDs, which will be assigned the variable `_post_id` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class UserDto { | |
@IsNotEmpty() id: string; | |
@IsNotEmpty() username: string; | |
@IsNotEmpty() @IsEmail() email: string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@JsonDeserialize(using = KotlinDataDeserializer::class) | |
data class Foo(val x: String, val y: String, val z: Int) | |
class KotlinDataDeserializer : StdDeserializer<Foo>(Foo::class.java) { | |
override fun deserialize(p: JsonParser, ctxt: DeserializationContext): Foo { | |
return p.readValueAs(Foo::class.java) | |
} | |
override fun deserialize(p: JsonParser, ctxt: DeserializationContext, intoValue: Foo): Foo { | |
val copy = intoValue::copy |