[swift-evolution] Question regarding SE-0167 Swift Encoders

Gwendal Roué gwendal.roue at gmail.com
Mon May 29 06:55:46 CDT 2017


> Le 29 mai 2017 à 13:51, Gwendal Roué <gwendal.roue at gmail.com> a écrit :
> 
> In the context of decoding of SQL rows, keys may refer to different things, depending on whether we are decoding a *value*, or a *complex object*:
> 
> - for values, keys are column names, as everybody can expect
> - for complex objects, keys are names of "row scopes". Row scopes are a concept introduced by GRDB.swift and allows a type that knows how to consume `SELECT * FROM table1` to consume as well the results of `SELECT table1.*, table2.* FROM table1 JOIN table2` through a "scope" that presents the row in the shape expected by the consumer (here, only columns from table1).

This is the general topic of "row adapters", something that I don't know if any other SQL libraries implements. You may thus not be familiar with it, and may even doubt if that concept has any value.

Row adapters are indeed quite unusual, but they're very useful, and solve hard problems.

Please check https://github.com/groue/GRDB.swift#row-adapters <https://github.com/groue/GRDB.swift#row-adapters> for more information.

Gwendal

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170529/9d90d7cb/attachment.html>


More information about the swift-evolution mailing list