简体   繁体   中英

How to store Swift types (Date, Dictionary and others) in PostgreSQL with Vapor 3?

I am using Vapor 3, Swift 5.1, PostgreSQL 12 and Postico 1.5.10 for my Backend. Question is: how to store Date (I mean Swift Date()) and Dictionary (example, [String : Int])?

To work with PostgeSQL, I am using Postico (I am quite newbie in PostgreSQL, that's why), please look at screenshot: 在此处输入图片说明

And, I just have seen how to store Arrays, but where I can find other types to store? For example, Enum?

I will be thankful for any help or advice!

  • for date timestamp without time zone
  • for [String: Any] should be jsonb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM