#Ok, worked a generic `sql` module using

1 messages ยท Page 1 of 1 (latest)

plush citrus
#

I have a few things that might help

  • ListTables should return []string, error, unless you're going to add more fields to TableDetails. If that's the plan, I think you probably want []TableDetails]
#

ok i guess just that to start with ๐Ÿ˜‚

high epoch
#

I was considering also getting the column details in one shot for list tables

#

lol

plush citrus
#

yeah that's fine too, I think the bug is that you're returning *TableDetails and not []TableDetails for listTables

#

but was also saying it could be simplified to just string since that's the only field right now

gray zealot
#

also: current main probably doesn't handle lists of objects, that's also fixed on llm-evals

high epoch
#

but still, returning ColumnDetails might have the same issue?

gray zealot
#

i tried a similar refactor out yesterday for my prompt engineering agent and it worked, but in my case it was better to just return a document style summary

plush citrus
#

yeah []ColumnDetails would have that issue

#

so I would have ListTables and ListColumns both return []string and then you can still call ListColumnDetails with the name of the table and column

high epoch
#

alright, so I'll simplify for now ๐Ÿ™

#

or is that known as a return type? SqlColumnDetails@xxh3:0e4c8f67b6fe069a

#

nm, forgot about the | <field> syntax - @gray zealot is it crazy to ask/want a | json on custom structs? Maybe file an issue for later?