sample

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

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 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 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 DescribeSearchIndex

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

func DescribeTableSample

func DescribeTableSample(client *tablestore.TableStoreClient, tableName 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 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 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 QueryRowsWithToken

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

*

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

func RangeQuery

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

*

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

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 UpdateTableSample

func UpdateTableSample(client *tablestore.TableStoreClient, tableName 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测试插入数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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