Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PartitionTypeList is default name for list partition PartitionTypeList = "LIST" // PartitionTypeRange is default name for range partition PartitionTypeRange = "RANGE" // CatchAllPartitionValue is max value for range partition CatchAllPartitionValue = "MAXVALUE" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*partitioner)
Option use new partitoner
func CatchAllPartitionName ¶
CatchAllPartitionName set catch all partition name for range partition
type Partitioner ¶
type Partitioner interface { IsPartitioned() (bool, error) HasPartition(*Partition) (bool, error) Creates(...*Partition) error Adds(...*Partition) error Drops(...*Partition) error Truncates(...*Partition) error PrepareCreates(...*Partition) (Handler, error) PrepareAdds(...*Partition) (Handler, error) PrepareDrops(...*Partition) (Handler, error) PrepareTruncates(...*Partition) (Handler, error) Dryrun(bool) Verbose(bool) }
Partitioner wrapper for handler
func NewListPartitioner ¶
func NewListPartitioner(db *sql.DB, table, expresstion string, options ...Option) Partitioner
NewListPartitioner is XXX
func NewRangePartitioner ¶
func NewRangePartitioner(db *sql.DB, table, expresstion string, options ...Option) Partitioner
NewRangePartitioner is XXX
Click to show internal directories.
Click to hide internal directories.