mapper

package module
v0.0.0-...-064e8c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2017 License: MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

xorm inflector mapper

Vexor status

Package implements Xorm IMapper that pluralizes table names

Installation

Just use go get.

go get github.com/humaniq/xorm-inflector-mapper

And then just import the package into your own code.

import (
    "github.com/humaniq/xorm-inflector-mapper"
)

Usage

You should use InflectorMapper with other Xorm mappers:

engine.SetTableMapper(mapper.NewInflectorMapper(SnakeMapper{}))

Pull requests policy

tl;dr. Contributions are welcome.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InflectorMapper

type InflectorMapper struct {
	Mapper core.IMapper
}

func NewInflectorMapper

func NewInflectorMapper(mapper core.IMapper) InflectorMapper

func (InflectorMapper) Obj2Table

func (mapper InflectorMapper) Obj2Table(name string) string

func (InflectorMapper) Table2Obj

func (mapper InflectorMapper) Table2Obj(name string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址