Closed yaitskov closed 4 years ago
Are you looking how to create the value of v
or proxy db
? You can create them as undefined :: Mytype
or undefined :: proxy db
.
When the values are not available, XScopedTypeVariables extension is quite handy.
undefined :: Mytype trick is working for compile time. I have a dynamic set of table names. New tables are created on demand. i.e. I cannot feed value from stdin into phantom parameter of Mytype.
Hi,
I am trying to use Groundhog for sharded tables. Lot's of tables with same structure, but different names.
PersistentEntity has entitfyDef function it gets undefined value in case of select operation. When value is persisted last argument gets normal value and I can get table name from there to figure out in which table to store the value.
I found that the reflection library allows to pass configuration (table name in my case) through out the proxy value.
I have no clue how to construct a type with phantom type variable in runtime.
Special thanks for the feature - table without primary key.