Documentation ¶
Index ¶
- Constants
- Variables
- func Compile(clause JoinerClause) string
- func RangesInvalidErr() error
- type JoinerClause
- type TableWithColumn
- type Variant
- func (it Variant) AllNameValues() []string
- func (it *Variant) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder
- func (it Variant) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder
- func (it *Variant) AsJsonContractsBinder() corejson.JsonContractsBinder
- func (it *Variant) AsJsonMarshaller() corejson.JsonMarshaller
- func (it *Variant) AsJsoner() corejson.Jsoner
- func (it Variant) Compile(left, right TableWithColumn) string
- func (it Variant) EnumType() enuminf.EnumTyper
- func (it Variant) Format(format string) (compiled string)
- func (it Variant) IntegerEnumRanges() []int
- func (it Variant) IsAnyNamesOf(names ...string) bool
- func (it Variant) IsAnyOf(anyOfItems ...Variant) bool
- func (it Variant) IsAnyValuesEqual(anyByteValues ...byte) bool
- func (it Variant) IsByteValueEqual(value byte) bool
- func (it Variant) IsCross() bool
- func (it Variant) IsFullOuter() bool
- func (it Variant) IsInnerJoinLogically() bool
- func (it Variant) IsInvalid() bool
- func (it Variant) IsJoin() bool
- func (it Variant) IsLeft() bool
- func (it Variant) IsLeftOuter() bool
- func (it Variant) IsNameEqual(name string) bool
- func (it Variant) IsOuterJoinLogically() bool
- func (it Variant) IsRight() bool
- func (it Variant) IsRightOuter() bool
- func (it Variant) IsValid() bool
- func (it Variant) IsValidLogically() bool
- func (it Variant) IsValueEqual(value byte) bool
- func (it Variant) JoinClause(left, right TableWithColumn) JoinerClause
- func (it Variant) Json() corejson.Result
- func (it *Variant) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it Variant) JsonPtr() *corejson.Result
- func (it Variant) MarshalJSON() ([]byte, error)
- func (it Variant) MaxByte() byte
- func (it Variant) MaxInt() int
- func (it Variant) MaxValueString() string
- func (it Variant) MinByte() byte
- func (it Variant) MinInt() int
- func (it Variant) MinMaxAny() (min, max interface{})
- func (it Variant) MinValueString() string
- func (it Variant) Name() string
- func (it Variant) NameValue() string
- func (it Variant) OnlySupportedErr(names ...string) error
- func (it Variant) OnlySupportedMsgErr(message string, names ...string) error
- func (it Variant) RangeNamesCsv() string
- func (it Variant) RangesByte() []byte
- func (it Variant) RangesDynamicMap() map[string]interface{}
- func (it Variant) String() string
- func (it Variant) ToNumberString() string
- func (it Variant) ToPtr() *Variant
- func (it *Variant) ToSimple() Variant
- func (it Variant) ToSqlName() string
- func (it Variant) TypeName() string
- func (it *Variant) UnmarshalJSON(data []byte) error
- func (it Variant) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)
- func (it Variant) Value() byte
- func (it Variant) ValueByte() byte
- func (it Variant) ValueInt() int
- func (it Variant) ValueInt16() int16
- func (it Variant) ValueInt32() int32
- func (it Variant) ValueInt8() int8
- func (it Variant) ValueString() string
- func (it Variant) ValueUInt16() uint16
Constants ¶
View Source
const ( // JoinTwoTableSyntaxFormat // // References: // - JOINSyntax : refers to the enum sql-syntax // - Join Sample : https://www.w3schools.com/sql/sql_join.asp // - Inner Join Sample : https://www.w3schools.com/sql/sql_join_inner.asp // - Joins Diagrams : https://prnt.sc/26guaad // - Code Samples : https://prnt.sc/26gub4k JoinTwoTableSyntaxFormat = "%s %s ON %s = %s" // JOINSyntax, LeftTable, LeftTableWithField, RightTableWithField )
Variables ¶
View Source
var ( Ranges = [...]string{ Default: "Default", Invalid: "Invalid", Join: "Join", Inner: "Inner", Left: "Left", Right: "Right", FullOuter: "FullOuter", Cross: "Cross", } InnerJoinMap = map[Variant]bool{ Default: true, Join: true, Inner: true, } OuterJoinMap = map[Variant]bool{ Left: true, Right: true, FullOuter: true, } SqlSyntax = [...]string{ Default: "JOIN", Invalid: "", Join: "JOIN", Inner: "INNER JOIN", Left: "LEFT JOIN", Right: "RIGHT JOIN", FullOuter: "FULL OUTER JOIN", Cross: "CROSS JOIN", } RangesMap = map[string]Variant{ "Default": Default, "Invalid": Invalid, "": Invalid, "Join": Join, "Inner": Inner, "Left": Left, "Right": Right, "FullOuter": FullOuter, "Cross": Cross, } BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice( coredynamic.TypeName(Left), Ranges[:]) )
Functions ¶
func Compile ¶ added in v0.0.2
func Compile(clause JoinerClause) string
func RangesInvalidErr ¶
func RangesInvalidErr() error
Types ¶
type JoinerClause ¶ added in v0.0.2
type JoinerClause struct { JoinType Variant Left TableWithColumn Right TableWithColumn }
JoinerClause
Compile using JoinTwoTableSyntaxFormat
References:
- Join Sample : https://www.w3schools.com/sql/sql_join.asp
- Inner Join Sample : https://www.w3schools.com/sql/sql_join_inner.asp
- Joins Diagrams : https://prnt.sc/26guaad
- Code Samples : https://prnt.sc/26gub4k
func (JoinerClause) Clone ¶ added in v0.0.2
func (it JoinerClause) Clone() JoinerClause
func (JoinerClause) Compile ¶ added in v0.0.2
func (it JoinerClause) Compile() string
Compile
generate to string using JoinTwoTableSyntaxFormat
References:
- Join Sample : https://www.w3schools.com/sql/sql_join.asp
- Inner Join Sample : https://www.w3schools.com/sql/sql_join_inner.asp
- Joins Diagrams : https://prnt.sc/26guaad
- Code Samples : https://prnt.sc/26gub4k
func (JoinerClause) SetLeftClone ¶ added in v0.0.2
func (it JoinerClause) SetLeftClone( left TableWithColumn, ) JoinerClause
func (JoinerClause) SetRightClone ¶ added in v0.0.2
func (it JoinerClause) SetRightClone( right TableWithColumn, ) JoinerClause
func (JoinerClause) String ¶ added in v0.0.2
func (it JoinerClause) String() string
String
generate to string using JoinTwoTableSyntaxFormat
References:
- Join Sample : https://www.w3schools.com/sql/sql_join.asp
- Inner Join Sample : https://www.w3schools.com/sql/sql_join_inner.asp
- Joins Diagrams : https://prnt.sc/26guaad
- Code Samples : https://prnt.sc/26gub4k
type TableWithColumn ¶ added in v0.0.2
type TableWithColumn struct {
TableName, ColumnName string
}
func (TableWithColumn) Clone ¶ added in v0.0.2
func (it TableWithColumn) Clone() TableWithColumn
func (TableWithColumn) TableWithField ¶ added in v0.0.2
func (it TableWithColumn) TableWithField() string
TableWithField
Table.FieldName
type Variant ¶
type Variant byte
const ( Default Variant = iota Invalid Join Inner Left Right FullOuter // Reference : https://www.w3schools.com/sql/sql_join_full.asp Cross )
func (Variant) AllNameValues ¶ added in v0.0.4
func (*Variant) AsBasicByteEnumContractsBinder ¶
func (it *Variant) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder
func (Variant) AsBasicEnumContractsBinder ¶
func (it Variant) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder
func (*Variant) AsJsonContractsBinder ¶
func (it *Variant) AsJsonContractsBinder() corejson.JsonContractsBinder
func (*Variant) AsJsonMarshaller ¶
func (it *Variant) AsJsonMarshaller() corejson.JsonMarshaller
func (Variant) Compile ¶ added in v0.0.2
func (it Variant) Compile(left, right TableWithColumn) string
Compile
References:
- Join Sample : https://www.w3schools.com/sql/sql_join.asp
- Inner Join Sample : https://www.w3schools.com/sql/sql_join_inner.asp
- Joins Diagrams : https://prnt.sc/26guaad
- Code Samples : https://prnt.sc/26gub4k
func (Variant) IntegerEnumRanges ¶ added in v0.0.4
func (Variant) IsAnyNamesOf ¶ added in v0.0.4
func (Variant) IsAnyValuesEqual ¶ added in v0.0.4
func (Variant) IsByteValueEqual ¶ added in v0.0.4
func (Variant) IsFullOuter ¶
func (Variant) IsInnerJoinLogically ¶
func (Variant) IsLeftOuter ¶
func (Variant) IsNameEqual ¶ added in v0.0.4
func (Variant) IsOuterJoinLogically ¶
func (Variant) IsRightOuter ¶
func (Variant) IsValidLogically ¶
func (Variant) IsValueEqual ¶ added in v0.0.4
func (Variant) JoinClause ¶ added in v0.0.2
func (it Variant) JoinClause(left, right TableWithColumn) JoinerClause
func (*Variant) JsonParseSelfInject ¶
func (Variant) MarshalJSON ¶
func (Variant) MaxValueString ¶ added in v0.0.4
func (Variant) MinValueString ¶ added in v0.0.4
func (Variant) OnlySupportedErr ¶ added in v0.0.4
func (Variant) OnlySupportedMsgErr ¶ added in v0.0.4
func (Variant) RangeNamesCsv ¶
func (Variant) RangesByte ¶
func (Variant) RangesDynamicMap ¶ added in v0.0.4
func (Variant) ToNumberString ¶
func (*Variant) UnmarshalJSON ¶
func (Variant) UnmarshallEnumToValue ¶
func (Variant) ValueInt16 ¶ added in v0.0.4
func (Variant) ValueInt32 ¶ added in v0.0.4
func (Variant) ValueString ¶ added in v0.0.4
func (Variant) ValueUInt16 ¶ added in v0.0.4
Click to show internal directories.
Click to hide internal directories.