chai icon indicating copy to clipboard operation
chai copied to clipboard

sql driver: conversion of lazy loaded document when Scanning

Open paralin opened this issue 3 years ago • 4 comments

Now that #382 was merged, my go-orm test is proceeding past inserting objects into the db!

The next hurdle is getting Scan() to work:

panic: sql: Scan error on column index 0, name "*": unsupported Scan, storing driver.Value type *database.lazilyDecodedDocument into type *sql.RawBytes

In database/sql/convert.go:219 (convertAssignRows) it tries to convert the *lazilyDecodedDocument into *sql.RawBytes.

paralin avatar Apr 11 '21 06:04 paralin

Cool! Could you share the query you tried to run? And any info that could help me investigate

asdine avatar Apr 11 '21 15:04 asdine

hey @paralin where is the ORM test code.

Are you using this for magallen ?

gedw99 avatar Apr 16 '21 07:04 gedw99

@asdine I've posted a PR with the ORM test code in #390

@gedw99 Not currently but I plan to eventually return to Magellan and build it into a production-grade project.

paralin avatar Apr 18 '21 21:04 paralin

@gedw99 Thank you for sharing but please let's keep this thread focused on the issue at hand

asdine avatar Apr 19 '21 14:04 asdine