Olá, sou iniciante no racket. Gostaria de capturar o valor *insert-id* que 
retorna em um uma struct chama simple-result 
<https://docs.racket-lang.org/db/query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._simple-result%29%29>
 da query 
<https://docs.racket-lang.org/db/query-api.html#%28def._%28%28lib._db%2Fbase..rkt%29._query%29%29>
 que 
executo. O retorno é o seguinte:


(simple-result '((insert-id . 30) (affected-rows . 1)))


Gostaria de obter o valor *30* por exemplo.

Código da execução da 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")))

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to