You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATETABLE "courier_services" (
"id"BIGSERIALPRIMARY KEY,
"hubs"BIGINT[] NOT NULL,
);
Model
classCourierServiceincludeClear::Modelself.table ="courier_services"
with_serial_pkey
column hubs : Array(Int64)
defto_jsonJSON.build do |json|
json.object do
json.field "id", id
json.field "hubs", hubs
endendendend
Error
api2 | D, [2018-08-30 00:26:42 +00:00 #4560] DEBUG -- : [1ms] SELECT * FROM "users" WHERE (character_id = 2047918291) ORDER BY "character_id" ASC LIMIT 1
api2 | D, [2018-08-30 00:26:42 +00:00 #4560] DEBUG -- : [857µs] SELECT * FROM "courier_services" WHERE (owner_id = 2047918291) ORDER BY "id" ASC LIMIT 1
api2 | Exception: Unexpected char '_' at 1:10 (JSON::ParseException)
api2 | from /usr/share/crystal/src/json/lexer.cr:365:7 in 'raise'
api2 | from /usr/share/crystal/src/json/lexer.cr:361:5 in 'unexpected_char'
api2 | from /usr/share/crystal/src/json/lexer.cr:360:38 in 'unexpected_char'
api2 | from /usr/share/crystal/src/json/lexer.cr:245:7 in 'consume_number'
api2 | from /usr/share/crystal/src/json/lexer.cr:63:7 in 'next_token'
api2 | from /usr/share/crystal/src/json/parser.cr:108:11 in 'next_token'
api2 | from /usr/share/crystal/src/json/parser.cr:113:5 in 'value_and_next_token'
api2 | from /usr/share/crystal/src/json/parser.cr:21:7 in 'parse_value'
api2 | from /usr/share/crystal/src/json/parser.cr:49:18 in 'parse_array'
api2 | from /usr/share/crystal/src/json/parser.cr:33:7 in 'parse_value'
api2 | from /usr/share/crystal/src/json/parser.cr:13:12 in 'parse'
api2 | from /usr/share/crystal/src/json.cr:91:5 in 'parse'
api2 | from lib/clear/src/clear/model/converter/array_converter.cr:4:1 in 'to_column'
api2 | from src/EveToolsApi/models/courier_service.cr:3:5 in 'set'
api2 | from src/EveToolsApi/models/courier_service.cr:3:5 in 'initialize'
api2 | from src/EveToolsApi/models/courier_service.cr:3:5 in 'new'
api2 | from src/EveToolsApi/models/courier_service.cr:3:5 in 'build:persisted:cache:fetch_columns'
api2 | from lib/clear/src/clear/model/collection.cr:269:16 in 'first'
api2 | from lib/clear/src/clear/model/collection.cr:265:5 in 'first'
api2 | from src/EveToolsApi/models/user.cr:18:5 in 'courier_service'
api2 | from src/EveToolsApi/routes/couriers_controller.cr:5:16 in '->'
api2 | from lib/kemal/src/kemal/route.cr:255:3 in '->'
api2 | from lib/kemal/src/kemal/route_handler.cr:255:3 in 'process_request'
api2 | from lib/kemal/src/kemal/route_handler.cr:15:7 in 'call'
api2 | from /usr/share/crystal/src/http/server/handler.cr:24:7 in 'call_next'
api2 | from lib/kemal/src/kemal/websocket_handler.cr:13:14 in 'call'
api2 | from /usr/share/crystal/src/http/server/handler.cr:24:7 in 'call_next'
api2 | from lib/kemal/src/kemal/filter_handler.cr:21:7 in 'call'
api2 | from /usr/share/crystal/src/http/server/handler.cr:24:7 in 'call_next'
api2 | from lib/kemal/src/kemal/exception_handler.cr:8:7 in 'call'
api2 | from /usr/share/crystal/src/http/server/handler.cr:24:7 in 'call_next'
api2 | from lib/kemal/src/kemal/log_handler.cr:10:35 in 'call'
api2 | from /usr/share/crystal/src/http/server/handler.cr:24:7 in 'call_next'
api2 | from lib/kemal/src/kemal/init_handler.cr:12:7 in 'call'
api2 | from /usr/share/crystal/src/http/server/request_processor.cr:39:11 in 'process'
api2 | from /usr/share/crystal/src/http/server/request_processor.cr:16:3 in 'process'
api2 | from /usr/share/crystal/src/http/server.cr:402:5 in 'handle_client'
api2 | from /usr/share/crystal/src/http/server.cr:368:13 in '->'
api2 | from /usr/share/crystal/src/fiber.cr:255:3 in 'run'
api2 | from /usr/share/crystal/src/fiber.cr:29:34 in '->'
api2 | from ???
Also tested without the to_json method, same error.
EDIT: Am using the clear master branch in my shards.yml
The text was updated successfully, but these errors were encountered:
SQL
Model
Error
Also tested without the
to_json
method, same error.EDIT: Am using the clear
master
branch in myshards.yml
The text was updated successfully, but these errors were encountered: