當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。