com.yahoo.squidb.sql.Query.toString()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(201)

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

Query.toString介绍

暂无

代码示例

代码示例来源:origin: yahoo/squidb

@Override
public int hashCode() {
  return toString().hashCode();
}

代码示例来源:origin: yahoo/squidb

@Override
public boolean equals(Object o) {
  return this == o || !(o == null || getClass() != o.getClass()) && this.toString().equals(o.toString());
}

代码示例来源:origin: yahoo/squidb

public void testLiteralProperties() {
  StringProperty stringLiteral = StringProperty.literal("abc", "strLit");
  assertEquals("SELECT 'abc' AS strLit", Query.select(stringLiteral).toString());
  IntegerProperty intLiteral = IntegerProperty.literal(1, "intLit");
  assertEquals("SELECT 1 AS intLit", Query.select(intLiteral).toString());
  long longVal = System.currentTimeMillis();
  LongProperty longLiteral = LongProperty.literal(longVal, "longLit");
  assertEquals("SELECT " + longVal + " AS longLit", Query.select(longLiteral).toString());
  DoubleProperty doubleLiteral = DoubleProperty.literal(1.1, "doubleLit");
  assertEquals("SELECT 1.1 AS doubleLit", Query.select(doubleLiteral).toString());
  BooleanProperty trueLiteral = BooleanProperty.literal(true, "trueLit");
  assertEquals("SELECT 1 AS trueLit", Query.select(trueLiteral).toString());
  BooleanProperty falseLiteral = BooleanProperty.literal(false, "falseLit");
  assertEquals("SELECT 0 AS falseLit", Query.select(falseLiteral).toString());
  EnumProperty enumLiteral = EnumProperty.literal(TestEnum.APPLE, "enumLit");
  assertEquals("SELECT 'APPLE' AS enumLit", Query.select(enumLiteral).toString());
}

代码示例来源:origin: com.yahoo.squidb/squidb

@Override
public int hashCode() {
  return toString().hashCode();
}

代码示例来源:origin: com.yahoo.squidb/squidb

@Override
public boolean equals(Object o) {
  return this == o || !(o == null || getClass() != o.getClass()) && this.toString().equals(o.toString());
}

代码示例来源:origin: yahoo/squidb

assertEquals(p.getExpression(), basicAlias.getExpression());
assertEquals("newAlias", basicAlias.getName());
assertEquals("SELECT testModels._id AS newAlias", Query.select(basicAlias).toString());
assertEquals(p.getExpression(), aliasWithTable.getExpression());
assertEquals("newAlias", aliasWithTable.getName());
assertEquals("SELECT newTable._id AS newAlias", Query.select(aliasWithTable).toString());
assertEquals(basicAlias.getName(), asSelectionFromTableNoAlias.getName());
assertFalse(asSelectionFromTableNoAlias.hasAlias());
assertEquals("SELECT testView.newAlias AS newAlias", Query.select(asSelectionFromTableNoAlias).toString());
assertEquals(basicAlias.getName(), asSelectionFromTableWithAlias.getExpression());
assertEquals("superAlias", asSelectionFromTableWithAlias.getName());
assertEquals("SELECT testView.newAlias AS superAlias", Query.select(asSelectionFromTableWithAlias).toString());

相关文章