sample

package
v1.8.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: Apache-2.0 Imports: 9 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 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 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 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 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 DescribeTimeseriesTableSample added in v1.7.0

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

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

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 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 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 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 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 SQLShowTablesSample added in v1.7.3

func SQLShowTablesSample(client *tablestore.TableStoreClient)

func ServerSideEncryptionSample added in v1.7.6

func ServerSideEncryptionSample(client *tablestore.TableStoreClient)

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 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 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测试插入数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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