Closed kilosonc closed 3 years ago
We don't recommend using reflection.
But the PR is using reflection. So are we good with this @hsluoyz @closetool ?
Also I was previously using pgAdapter.WithTableName(tableName) as follows
pgAdapter.NewAdapterByDB(db, pgAdapter.WithTableName(tableName))
Now that method is gone. Can you please give a sample code for creating the adapter with table name specified
@arafat-java No, this PR won't be merged. We made an issue https://github.com/go-pg/pg/issues/1874.
@closetool why we remove WithTableName()
?
@hsluoyz Because it was replaced by WithTable
type Table1 CasbinRule
NewAdapterWithDB(db,WithTable(Table1{}))
@closetool WithTable() uses struct, it's not good. We should add back WithTableName()
.
@hsluoyz emmmm, we should wait https://github.com/go-pg/pg/issues/1874 fixed, then we could add it back
Signed-off-by: closetool c299999999@qq.com
Fix: #26