Summit Apps Q&A
tend78er at August 24th, 2017 22:16 — #1
I am trying to work the the data store and when ever i test the following code all instead of returning the row data i get Table 0x41440010
local datastore = require "summit.datastore"
local my_table = datastore.get_table("ANILookupMap", "map")
print(type(my_table), tostring(my_table))
my_data = {foo="bar"}
local result, err = my_table:create('123', my_data)
print(result, err)
local query_row = my_table:get_row_by_key('123')
print(query_row) -- prints {key='123', data={foo="bar"} here is where I only get the table 0x0441410 message.
Thanks for your help
chrisstevens at August 28th, 2017 08:56 — #2
@Tend78er
When you print(query_row) you are just getting the table row.
If you were to say print(query_row.data) that would return the row data.
rylos at August 30th, 2017 12:21 — #3
include the inspect library and then use: print(inspect(my_table)) or I believe you can use inspect on your query_row as well. You will get a formatted list of all of the table values. When you use print natively, it just lists out the table ID rather than the contents.