Olá, Funcionou 100%, do jeito que esperava. Muito obrigado.
Em quinta-feira, 27 de setembro de 2018 17:07:13 UTC-3, Vincent St-Amour escreveu: > > Olá, > > Se eu entendi sua pergunta, a função `dict-ref` é o que você quer: > > (dict-ref (query ..) 'insert-id) > > Vincent > > > > On Thu, 27 Sep 2018 14:24:39 -0500, > [email protected] <javascript:> wrote: > > > > Olá, sou iniciante no racket. Gostaria de capturar o valor insert-id que > retorna em um uma struct chama simple-result da query 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 [email protected] <javascript:>. > > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

