1
Hello, I’m a beginner in Racket. I would like to capture the value Insert-id that returns in a flame struct simple-result of query which I execute. The return is as follows:
(simple-result '((insert-id . 30) (affected-rows . 1)))
I’d like to get the value 30 for example.
Code of execution of the query:
(define save_pergunta
(lambda (tf_pergunta)
(define result_save_pergunta (
query conn "INSERT INTO perguntas VALUES (null, $pergunta)" tf_pergunta))
(print result_save_pergunta)
(printf "\nPergunta Cadastrada!\n")))