CREATE TABLE media
(
id bigserial NOT NULL PRIMARY KEY,
tags text[]
);
now do:
let rows = try connection.simpleQuery("SELECT * FROM media WHERE id = '1'").wait()
then loop through the fields and callon the tags column:
column.array(of: String.self)
The system dies here: Array b field did not equal zero.
version: Vapor Postgres-NIO: 1.0.0-rc.1.2
file: PostgresNIO>Data>PostgresData+Array.swift
line:78:
assert(b == 0, "Array b field did not equal zero")
The actual issue:
Please implement support for arrays in simpleQuery.
Low prio requests:
1) please rename 'b' to a more useful name
2) please throw an error that is more clear than the b == 0 assertion.
create a table:
now do:
then loop through the fields and callon the tags column: column.array(of: String.self)
The system dies here: Array b field did not equal zero. version: Vapor Postgres-NIO: 1.0.0-rc.1.2 file: PostgresNIO>Data>PostgresData+Array.swift line:78:
The actual issue: Please implement support for arrays in simpleQuery.
Low prio requests: 1) please rename 'b' to a more useful name 2) please throw an error that is more clear than the b == 0 assertion.