com.google.firebase.database.Query.equalTo()方法的使用及代码示例

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

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

Query.equalTo介绍

[英]Create a query constrained to only return child nodes with the given value.
[中]创建一个仅返回具有给定值的子节点的查询。

代码示例

代码示例来源:origin: TomGrill/gdx-firebase

@Override
public Query equalTo(boolean value, String key) {
  return new DesktopQuery(query.equalTo(value, key));
}

代码示例来源:origin: TomGrill/gdx-firebase

@Override
public Query equalTo(double value, String key) {
  return new DesktopQuery(query.equalTo(value, key));
}

代码示例来源:origin: TomGrill/gdx-firebase

@Override
public Query equalTo(String value) {
  return new DesktopQuery(query.equalTo(value));
}

代码示例来源:origin: TomGrill/gdx-firebase

@Override
public Query equalTo(String value, String key) {
  return new DesktopQuery(query.equalTo(value, key));
}

代码示例来源:origin: TomGrill/gdx-firebase

@Override
public Query equalTo(double value) {
  return new DesktopQuery(query.equalTo(value));
}

代码示例来源:origin: TomGrill/gdx-firebase

@Override
public Query equalTo(boolean value) {
  return new DesktopQuery(query.equalTo(value));
}

代码示例来源:origin: thinkmobiles/Android-MVP-vs-MVVM-Samples

public final void getCheckInByEmail(final String _email, final OnLoadCallback<CheckIn> loadCallback) {
  mDatabaseCheckIn.orderByChild("email").equalTo(_email).addListenerForSingleValueEvent(new ValueEventListener() {
    @Override
    public void onDataChange(DataSnapshot dataSnapshot) {
      long count = dataSnapshot.getChildrenCount();
      Log.d(TAG, TABLE_CHECK_IN + " | MyCheckIns | Count is: " + count);
      final List<CheckIn> checkIns = new ArrayList<CheckIn>();
      for (final DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {
        final CheckIn checkIn = dataSnapshot1.getValue(CheckIn.class);
        checkIns.add(checkIn);
        Log.d(TAG, TABLE_CHECK_IN + " | MyCheckIns | Value " + checkIn.checkInMessage);
      }
      loadCallback.onDataChange(checkIns);
    }
    @Override
    public void onCancelled(DatabaseError databaseError) {
      Log.d(TAG, TABLE_CHECK_IN + " | MyCheckIns | Failed to read: ", databaseError.toException());
      loadCallback.onCancelled();
    }
  });
}

代码示例来源:origin: hieuapp/android-firebase-chat

public void leaveGroup(final Group group){
  FirebaseDatabase.getInstance().getReference().child("group/"+group.id+"/member")
      .orderByValue().equalTo(StaticConfig.UID)
      .addListenerForSingleValueEvent(new ValueEventListener() {
        @Override

代码示例来源:origin: dragosholban/AndroidMyInstagramApp

Query likesQuery = database.child("likes").orderByChild("imageId").equalTo(image.key);
likesQuery.addChildEventListener(new ChildEventListener() {
  @Override

代码示例来源:origin: hieuapp/android-firebase-chat

.setTopColorRes(R.color.colorPrimary)
    .show();
FirebaseDatabase.getInstance().getReference().child("user").orderByChild("email").equalTo(email).addListenerForSingleValueEvent(new ValueEventListener() {
  @Override
  public void onDataChange(DataSnapshot dataSnapshot) {

代码示例来源:origin: hieuapp/android-firebase-chat

if (idFriend != null) {
  FirebaseDatabase.getInstance().getReference().child("friend").child(StaticConfig.UID)
      .orderByValue().equalTo(idFriend).addListenerForSingleValueEvent(new ValueEventListener() {
    @Override
    public void onDataChange(DataSnapshot dataSnapshot) {

相关文章