creator.go 645 B

12345678910111213141516171819202122232425262728293031
  1. package simplemaria
  2. import (
  3. "github.com/xyproto/pinterface"
  4. )
  5. // For implementing pinterface.ICreator
  6. type MariaCreator struct {
  7. host *Host
  8. }
  9. func NewCreator(host *Host) *MariaCreator {
  10. return &MariaCreator{host}
  11. }
  12. func (m *MariaCreator) NewList(id string) (pinterface.IList, error) {
  13. return NewList(m.host, id)
  14. }
  15. func (m *MariaCreator) NewSet(id string) (pinterface.ISet, error) {
  16. return NewSet(m.host, id)
  17. }
  18. func (m *MariaCreator) NewHashMap(id string) (pinterface.IHashMap, error) {
  19. return NewHashMap(m.host, id)
  20. }
  21. func (m *MariaCreator) NewKeyValue(id string) (pinterface.IKeyValue, error) {
  22. return NewKeyValue(m.host, id)
  23. }