sample

package
v1.7.13 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TABLE_NAME_DISABLE     = "disableSseSampleTable"
	TABLE_NAME_KMS_SERVICE = "kmsServiceSampleTable"
	TABLE_NAME_BYOK        = "byokSampleTable"
	PRIMARY_KEY_NAME       = "pk"

	BYOK_KEY_ID   = ""
	BYOK_ROLE_ARN = "acs:ram::<aliuid>:role/kms-ots-test"
)

Variables

This section is empty.

Functions

func AggregationSample

func AggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • Aggregation示例

func Analysis

func Analysis(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 创建一个SearchIndex,为TEXT类型索引列自定义分词器

func AvgAggregationSample added in v1.7.12

func AvgAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func BatchGetRowSample

func BatchGetRowSample(client *tablestore.TableStoreClient, tableName string)

func BatchWriteRowSample

func BatchWriteRowSample(client *tablestore.TableStoreClient, tableName string)

func BoolQuery

func BoolQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 通过BoolQuery进行复合条件查询。

func ComputeSplitPointsBySize

func ComputeSplitPointsBySize(client *tablestore.TableStoreClient, tableName string)

func CountAggregationSample added in v1.7.12

func CountAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func CreateSearchIndex

func CreateSearchIndex(client *tablestore.TableStoreClient, tableName string, indexName string)

*

*创建一个SearchIndex,包含Col_Keyword和Col_Long两列,类型分别设置为字符串(KEYWORD)和整型(LONG)。

func CreateSearchIndexForAggregationAndGroupBy

func CreateSearchIndexForAggregationAndGroupBy(client *tablestore.TableStoreClient, tableName string, indexName string)

*

*创建一个SearchIndex,为Aggregation和GroupBy的demo做准备

func CreateSearchIndexForQueryHighlighting added in v1.7.9

func CreateSearchIndexForQueryHighlighting(client *tablestore.TableStoreClient, tableName string, indexName string)

创建一个SearchIndex,为查询高亮Demo做正准备

func CreateSearchIndexForSearchQuery added in v1.7.12

func CreateSearchIndexForSearchQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

func CreateSearchIndexForVectorQuery added in v1.7.13

func CreateSearchIndexForVectorQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

CreateSearchIndexForVectorQuery: Create Searchindex with vector field.

func CreateSearchIndexWithIndexSort

func CreateSearchIndexWithIndexSort(client *tablestore.TableStoreClient, tableName string, indexName string)

*

*创建一个SearchIndex,包含Col_Keyword和Col_Long两列,类型分别设置为字符串(KEYWORD)和整型(LONG),设置按照Col_Long这一列预先排序。

func CreateSearchIndexWithVirtualField added in v1.7.0

func CreateSearchIndexWithVirtualField(client *tablestore.TableStoreClient, tableName string, indexName string)

*

*创建一个含虚拟列SearchIndex
*包含Col_Keyword和Col_Long两个基础列,类型分别设置为字符串(KEYWORD)和整型(LONG)。
*Col_long_str 为虚拟列,类型为字符串(KEYWORD)映射原始列为Col_long

func CreateTableKeyAutoIncrementSample

func CreateTableKeyAutoIncrementSample(client *tablestore.TableStoreClient)

func CreateTableSample

func CreateTableSample(client *tablestore.TableStoreClient, tableName string)

func CreateTableWithGlobalIndexSample

func CreateTableWithGlobalIndexSample(client *tablestore.TableStoreClient, tableName string)

func CreateTableWithLocalIndexSample

func CreateTableWithLocalIndexSample(client *tablestore.TableStoreClient, tableName string)

func CreateTimeseriesTableSample added in v1.7.0

func CreateTimeseriesTableSample(client *tablestore.TimeseriesClient, timeseriesTableName string, timetoLive int64)

CreateTimeseriesTableSample 创建一个时序表,其中表名为:timeseriesTableName,TTL为:timetolive。

func CreateTimeseriesTableWithAnalyticalStoreSample added in v1.7.8

func CreateTimeseriesTableWithAnalyticalStoreSample(tsClient *tablestore.TimeseriesClient, timeseriesTableName string)

CreateTimeseriesTableWithAnalyticalStoreSample 创建时序表,并且创建分析存储

func DeleteRowSample

func DeleteRowSample(client *tablestore.TableStoreClient, tableName string)

func DeleteSearchIndex

func DeleteSearchIndex(client *tablestore.TableStoreClient, tableName string, indexName string)

func DeleteTableSample

func DeleteTableSample(client *tablestore.TableStoreClient)

func DeleteTimeseriesTableSample added in v1.7.0

func DeleteTimeseriesTableSample(client *tablestore.TimeseriesClient, timeseriesTableName string)

DeleteTimeseriesTableSample 删除实例中表名为timeseriesTableName的时序表

func DescribeSearchIndex

func DescribeSearchIndex(client *tablestore.TableStoreClient, tableName string, indexName string)

func DescribeTableSample

func DescribeTableSample(client *tablestore.TableStoreClient, tableName string)

func DescribeTimeseriesAnalyticalStoresSample added in v1.7.8

func DescribeTimeseriesAnalyticalStoresSample(tsClient *tablestore.TimeseriesClient, timeseriesTableName string)

DescribeTimeseriesAnalyticalStoresSample 列出时序表下面所有的分析存储,并且打印出分析存储的同步状态和存储大小

func DescribeTimeseriesTableSample added in v1.7.0

func DescribeTimeseriesTableSample(client *tablestore.TimeseriesClient, timeseriesTableName string)

* * DescribeTimeseriesTableSample 获取时序表timeseriesTableName的元数据信息。

func DistinctAggregationSample added in v1.7.12

func DistinctAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func FieldSort_missingField added in v1.7.7

func FieldSort_missingField(client *tablestore.TableStoreClient, tableName string, indexName string)

func GeoBoundingBoxQuery

func GeoBoundingBoxQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • Col_GeoPoint是GeoPoint类型,查询表中Col_GeoPoint这一列的值在左上角为"10,0", 右下角为"0,10"的矩形范围内的数据。

func GeoDistanceQuery

func GeoDistanceQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_GeoPoint这一列的值距离中心点不超过一定距离的数据。

func GeoPolygonQuery

func GeoPolygonQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_GeoPoint这一列的值在一个给定多边形范围内的数据。

func GetRangeSample

func GetRangeSample(client *tablestore.TableStoreClient, tableName string)

func GetRangeWithRegxFilterSample

func GetRangeWithRegxFilterSample(client *tablestore.TableStoreClient, tableName string)

func GetRowSample

func GetRowSample(client *tablestore.TableStoreClient, tableName string)

func GetStreamRecordSample

func GetStreamRecordSample(client *tablestore.TableStoreClient, tableName string)

func GetStreamRecordWithTimestampSample

func GetStreamRecordWithTimestampSample(client *tablestore.TableStoreClient, tableName string)

func GetTimeseriesDataSample added in v1.7.0

func GetTimeseriesDataSample(client *tablestore.TimeseriesClient, timeseriesTableName string)

* * GetTimeseriesDataSample 根据timeseriesKey获取时序表中指定的时间线数据

func GroupByDateHistogramSample added in v1.7.12

func GroupByDateHistogramSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupByFieldSample added in v1.7.12

func GroupByFieldSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupByFilterSample added in v1.7.12

func GroupByFilterSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupByGeoDistanceSample added in v1.7.12

func GroupByGeoDistanceSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupByGeoGridSample added in v1.7.12

func GroupByGeoGridSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupByHistogramSample added in v1.7.12

func GroupByHistogramSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupByRangeSample added in v1.7.12

func GroupByRangeSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func GroupBySample

func GroupBySample(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • GroupBy示例

func ListSearchIndex

func ListSearchIndex(client *tablestore.TableStoreClient, tableName string)

func ListTableSample

func ListTableSample(client *tablestore.TableStoreClient)

func ListTimeseriesTableSample added in v1.7.0

func ListTimeseriesTableSample(client *tablestore.TimeseriesClient)

* * ListTimeseriesTableSample 列出实例中所有时序表的元数据信息

func MatchAllQuery

func MatchAllQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

func MatchPhraseQuery

func MatchPhraseQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_Text这一列的值能够匹配"hangzhou shanghai"的数据,匹配条件为短语匹配(要求短语完整的按照顺序匹配),返回匹配到的总行数和一些匹配成功的行。

func MatchQuery

func MatchQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_Keyword这一列的值能够匹配"hangzhou"的数据,返回匹配到的总行数和一些匹配成功的行。

func MaxAggregationSample added in v1.7.12

func MaxAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func ParallelScanMultiConcurrency added in v1.6.0

func ParallelScanMultiConcurrency(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • ParallelScan多并发

func ParallelScanSingleConcurrency added in v1.6.0

func ParallelScanSingleConcurrency(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • ParallelScan单并发

func PercentilesAggregationSample added in v1.7.12

func PercentilesAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func PrefixQuery

func PrefixQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_Keyword这一列前缀为"hangzhou"的数据。

func PutRowSample

func PutRowSample(client *tablestore.TableStoreClient, tableName string)

func PutRowWithKeyAutoIncrementSample

func PutRowWithKeyAutoIncrementSample(client *tablestore.TableStoreClient)

func PutRowWithTxnSample

func PutRowWithTxnSample(client *tablestore.TableStoreClient, tableName string)

func PutTimeseriesDataSample added in v1.7.0

func PutTimeseriesDataSample(client *tablestore.TimeseriesClient, timeseriesTableName string)

* * PutTimeseriesDataSample 向时序表中写入一个或多个时序数据。

func QueryHighlightingSample added in v1.7.9

func QueryHighlightingSample(client *tablestore.TableStoreClient, tableName string, indexName string)

QueryHighlightingSample 查询高亮示例

func QueryRowsWithToken

func QueryRowsWithToken(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 使用Token进行翻页读取。
  • 如果SearchResponse返回了NextToken,可以使用这个Token发起下一次查询,
  • 直到NextToken为空(nil),此时代表所有符合条件的数据已经读完。

func QueryTimeseriesMetaSample added in v1.7.0

func QueryTimeseriesMetaSample(client *tablestore.TimeseriesClient, timeseriesTableName string)

* * QueryTimeseriesMetaSample 根据指定条件查询数据表中特定时间线的measurement、source、tag信息,其中查询条件可组合。

func RangeQuery

func RangeQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_Long这一列大于3的数据,结果按照Col_Long这一列的值逆序排序。

func SQLCreateTableSample added in v1.7.3

func SQLCreateTableSample(client *tablestore.TableStoreClient)

SQLCreateTableSample 目前Create Table创建的是mapping映射表

func SQLDescribeTableSample added in v1.7.3

func SQLDescribeTableSample(client *tablestore.TableStoreClient)

func SQLDropMappingTableSample added in v1.7.3

func SQLDropMappingTableSample(client *tablestore.TableStoreClient)

func SQLQuerySample added in v1.7.3

func SQLQuerySample(client *tablestore.TableStoreClient)

func SQLSelectSample added in v1.7.3

func SQLSelectSample(client *tablestore.TableStoreClient)

func SQLSelectTimeTypeSample added in v1.7.8

func SQLSelectTimeTypeSample(client *tablestore.TableStoreClient)

func SQLShowTablesSample added in v1.7.3

func SQLShowTablesSample(client *tablestore.TableStoreClient)

func SearchQuery added in v1.7.12

func SearchQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

func ServerSideEncryptionSample added in v1.7.6

func ServerSideEncryptionSample(client *tablestore.TableStoreClient)

func SumAggregationSample added in v1.7.12

func SumAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func TermQuery

func TermQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_Keyword这一列精确匹配"hangzhou"的数据。

func TermsQuery

func TermsQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 查询表中Col_Keyword这一列精确匹配"hangzhou"或"tablestore"的数据。

func TopRowsAggregationSample added in v1.7.12

func TopRowsAggregationSample(client *tablestore.TableStoreClient, tableName string, indexName string)

func UpdateRowSample

func UpdateRowSample(client *tablestore.TableStoreClient, tableName string)

func UpdateRowWithIncrement

func UpdateRowWithIncrement(client *tablestore.TableStoreClient, tableName string)

func UpdateSearchIndexSchema added in v1.7.4

func UpdateSearchIndexSchema(client *tablestore.TableStoreClient, tableName string, indexName string, indexReindexName string)

*

  • 动态修改schema
  • 修改schema的索引必须以_reindex结尾

func UpdateTableSample

func UpdateTableSample(client *tablestore.TableStoreClient, tableName string)

func UpdateTimeseriesMetaSample added in v1.7.0

func UpdateTimeseriesMetaSample(tsClient *tablestore.TimeseriesClient, timeseriesTableName string)

* * UpdateTimeseriesMetaSample 更新时间线中的Attributes信息。

func UpdateTimeseriesTableSample added in v1.7.0

func UpdateTimeseriesTableSample(client *tablestore.TimeseriesClient, timeseriesTableName string)

* * UpdateTimeseriesTableSample 更新时序表的TTL参数

func VectorQuerySample added in v1.7.13

func VectorQuerySample(client *tablestore.TableStoreClient, tableName string, indexName string)

func WildcardQuery

func WildcardQuery(client *tablestore.TableStoreClient, tableName string, indexName string)

*

  • 使用通配符查询,查询表中Col_Keyword这一列的值匹配"hang*u"的数据

func WriteData

func WriteData(client *tablestore.TableStoreClient, tableName string)

func WriteDataForAggregationAndGroupBy

func WriteDataForAggregationAndGroupBy(client *tablestore.TableStoreClient, tableName string)

*

  • 为Aggregation和GroupBy测试插入数据

func WriteDataForQueryHighlighting added in v1.7.9

func WriteDataForQueryHighlighting(client *tablestore.TableStoreClient, tableName string)

WriteDataForQueryHighlighting 为高亮查询测试插入数据

func WriteDataForVectorQuery added in v1.7.13

func WriteDataForVectorQuery(client *tablestore.TableStoreClient, tableName string)

WriteDataForVectorQuery 为高亮查询测试插入数据

func WriteDateForSearchQuery added in v1.7.12

func WriteDateForSearchQuery(client *tablestore.TableStoreClient, tableName string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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