https://kotlinlang.org logo
#exposed
Title
# exposed
d

dave08

01/25/2018, 8:51 PM
If I have an existing postgres schema managed by a python framework, but would like my api to do CRUD on only part of the schema, can I just declare part of it in exposed at use only the part I need? I just need CRUD, not that it should change the structure at all...
t

tapac

01/25/2018, 10:24 PM
You may map only tables you need and dont call ddl methods (create/drop/etc).
d

dave08

01/26/2018, 3:42 AM
Can I map only part of the fields in a table (only the ones I need to alter/query in the api)? Also can I specify default values for certain fields (not managed by the db)? Thanks!
t

tapac

01/26/2018, 7:16 AM
Yes, you can. Use .clientDefault function to define value generated for field for inserts
👍🏼 1
2 Views