当前位置: 首页>>代码示例>>Golang>>正文


Golang aspect.ColumnElem类代码示例

本文整理汇总了Golang中github.com/aodin/aspect.ColumnElem的典型用法代码示例。如果您正苦于以下问题:Golang ColumnElem类的具体用法?Golang ColumnElem怎么用?Golang ColumnElem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ColumnElem类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: AsKMLVersion

// Return the geometry as a KML element.
func AsKMLVersion(c aspect.ColumnElem, version, maxdigits int) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{
			Inner: aspect.ArrayClause{
				Clauses: []aspect.Clause{
					aspect.IntClause{D: version},
					c.Inner(),
					aspect.IntClause{D: maxdigits},
				},
				Sep: ", ",
			},
			F: "ST_AsKML",
		},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:16,代码来源:output.go

示例2: StringAgg

func StringAgg(c aspect.ColumnElem, separator string) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{
			Inner: aspect.ArrayClause{
				Clauses: []aspect.Clause{
					c,
					aspect.StringClause{
						Name: separator,
					},
				},
				Sep: separator,
			},
			F: "string_agg",
		},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:16,代码来源:functions.go

示例3: AsLatLon

// Return the Degrees, Minutes, Seconds representation of the given point
func AsLatLon(c aspect.ColumnElem) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{Inner: c.Inner(), F: "ST_AsLatLonText"},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:6,代码来源:output.go

示例4: AsBinary

// Return the Well-Known Binary (WKB) representation of the geometry/geography
// without SRID meta data
func AsBinary(c aspect.ColumnElem) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{Inner: c.Inner(), F: "ST_AsBinary"},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:7,代码来源:output.go

示例5: GeoHash

// Return a GeoHash representation of the geometry.
func GeoHash(c aspect.ColumnElem) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{Inner: c.Inner(), F: "ST_GeoHash"},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:6,代码来源:output.go

示例6: AsGeoJSON

// Return the geometry as a GeoJSON element
func AsGeoJSON(c aspect.ColumnElem) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{Inner: c.Inner(), F: "ST_AsGeoJSON"},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:6,代码来源:output.go

示例7: AsGeography

func AsGeography(c aspect.ColumnElem) aspect.ColumnElem {
	return c.SetInner(aspect.BinaryClause{
		Pre: c.Inner(),
		Sep: "::geography",
	})
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:6,代码来源:casts.go

示例8: AreaOf

// Returns the area of the given column
// For "geometry" type area is in SRID units.
// For "geography" area is in square meters.
func AreaOf(c aspect.ColumnElem) aspect.ColumnElem {
	return c.SetInner(
		aspect.FuncClause{Inner: c.Inner(), F: "ST_Area"},
	)
}
开发者ID:shyrobbiani,项目名称:aspect,代码行数:8,代码来源:functions.go


注:本文中的github.com/aodin/aspect.ColumnElem类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。