Skip to content

Commit

Permalink
Add SetTablePrefix for issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Apr 19, 2018
1 parent 2c29005 commit 39cf210
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions userstate.go
Expand Up @@ -153,6 +153,11 @@ func (state *UserState) Host() pinterface.IHost {
return state.host
}

// Set a custom PostgreSQL database table prefix
func (state *UserState) SetTablePrefix(prefix string) {
db.SetColumnNames(prefix+"_a_list", prefix+"_a_set", prefix+"_owner", prefix+"_a_kv_")
}

// Close the connection to the database host
func (state *UserState) Close() {
state.host.Close()
Expand Down

0 comments on commit 39cf210

Please sign in to comment.