com.datastax.driver.core.Row.getPartitionKeyToken()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中com.datastax.driver.core.Row.getPartitionKeyToken方法的一些代码示例,展示了Row.getPartitionKeyToken的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Row.getPartitionKeyToken方法的具体详情如下:
包路径:com.datastax.driver.core.Row
类名称:Row
方法名:getPartitionKeyToken

Row.getPartitionKeyToken介绍

[英]Returns the value of the first column containing a Token.

This method is a shorthand for queries returning a single token in an unaliased column. It will look for the first name matching token(...):

ResultSet rs = session.execute("SELECT token(k) FROM my_table WHERE k = 1");

If that doesn't work for you (for example, if you're using an alias), use #getToken(int) or #getToken(String).
[中]返回包含标记的第一列的值。
此方法是在未关联列中返回单个标记的查询的简写。它将查找名字匹配的令牌(…):

ResultSet rs = session.execute("SELECT token(k) FROM my_table WHERE k = 1");

如果这对您不起作用(例如,如果您使用的是别名),请使用#getToken(int)或#getToken(String)。

代码示例

代码示例来源:origin: jsevellec/cassandra-unit

@Override
  public Token getPartitionKeyToken()
  {
    return row.getPartitionKeyToken();
  }
}

代码示例来源:origin: com.bazaarvoice.emodb/emodb-sor

@Override
public Token getPartitionKeyToken() {
  return _oldRow.getPartitionKeyToken();
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Override
  public Token getPartitionKeyToken()
  {
    return row.getPartitionKeyToken();
  }
}

代码示例来源:origin: com.strapdata.cassandra/cassandra-all

@Override
  public Token getPartitionKeyToken()
  {
    return row.getPartitionKeyToken();
  }
}

代码示例来源:origin: bazaarvoice/emodb

@Override
public Token getPartitionKeyToken() {
  return _oldRow.getPartitionKeyToken();
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

assertThat(token.getType()).isEqualTo(expectedTokenType);
assertThat(row.getPartitionKeyToken()).isEqualTo(token);

代码示例来源:origin: com.datastax.dse/dse-java-driver-core

assertThat(token.getType()).isEqualTo(expectedTokenType);
assertThat(row.getPartitionKeyToken()).isEqualTo(token);

相关文章