Closed diuming closed 5 years ago
@diuming, With regard to your questions R1 and R2 we are planning on adding support for nested structs, arrays and dictionaries along with relations. Currently however the focus is on resolving functional issues to build a stable base to build these enhancements on top of.
Database
does not expose an API for getting a connection, at this time you would have to keep a reference to the connection pool you initialised it with and use that directly.
I will do some investigation into the enum issue and update once I have some findings.
@kilnerm I got it and thank you for helping me.
@diuming, Did you resolve your issue with the enum and Model?
In looking at the issue yesterday I understand why the problem occurs but could not see a way to resolve it. When the ColorComponent
table is created the TypeDecoder
identifies the CMYKChannel
as an integer field. When the save occurs the DatabaseEncoder
is not able to make that determination and the value is encoded as C
. I did experiment with using CustomStringConvertible
and was able to get the raw value written to the database but then when reading the record back into a Model
it fails during decoding as the DatabaseDecoder
is unable to support the custom CYMKChannel
type.
enum issue when adopting Model
Swift-Kuery-ORM: 0.4.1 PostgreSQL: 10.6
other questions:
R1
) 701 : Nested structs or dictionaries are not supportedR2
) 701 : Arrays or sets are not supported How do I get DB connection or pool fromDatabase.default
? Do you have any plan to supportR1
andR2
?create an object and save it
swift code