Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPL #14205

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

PPL #14205

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Firestore/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ firebase_ios_glob(
src/objc/*.h
src/remote/*.cc
src/remote/*.h
src/called_by_swift/include/*.h
src/called_by_swift/*.cc
EXCLUDE ${nanopb_sources}
)

Expand Down
24 changes: 24 additions & 0 deletions Firestore/core/src/called_by_swift/include/pipeline.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// Created by Cheryl Lin on 2024-11-13.
//

#ifndef FIREBASE_PIPELINE_H
#define FIREBASE_PIPELINE_H

#include <vector>
#include "Firestore/core/src/called_by_swift/include/pipeline_result.h"

namespace firebase {
namespace firestore {
namespace core {
class Pipeline {
public:
Pipeline();

std::vector<PipelineResult> execute();
};
} // namespace core
} // namespace firestore
} // namespace firebase

#endif // FIREBASE_PIPELINE_H
32 changes: 32 additions & 0 deletions Firestore/core/src/called_by_swift/include/pipeline_result.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@


#include <string>
#include <unordered_map>
#include <vector>
#include "Firestore/core/include/firebase/firestore/timestamp.h"
#include "Firestore/core/src/api/api_fwd.h"

namespace firebase {
namespace firestore {

namespace model {
class FieldPath;
class FieldValue;
} // namespace model

namespace core {

class PipelineResult {
public:
PipelineResult();

Timestamp getCreateTime() const;

std::unordered_map<std::string, model::FieldValue> getData() const;

api::DocumentReference getReference() const;
};
} // namespace core

} // namespace firestore
} // namespace firebase
39 changes: 39 additions & 0 deletions Firestore/core/src/called_by_swift/include/pipeline_source.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright 2024 LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <string>
#include <vector>

#include "Firestore/core/src/api/api_fwd.h"
#include "Firestore/core/src/called_by_swift/include/pipeline.h"

namespace firebase {
namespace firestore {
namespace core {
class PipelineSource {
public:
explicit PipelineSource();

// Creates a new Pipeline that operates on the specified Firestore collection.
Pipeline GetCollection(const std::string collection_path);

// Creates a new Pipeline that operates on a specific set of Firestore
// documents.
Pipeline GetDocuments(const std::vector<api::DocumentReference> docs);
};
} // namespace core
} // namespace firestore
} // namespace firebase
11 changes: 11 additions & 0 deletions Firestore/core/src/called_by_swift/pipeline.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#include "Firestore/core/src/called_by_swift/include/pipeline.h"
namespace firebase {
namespace firestore {
namespace core {
Pipeline::Pipeline() {
}

} // namespace core
} // namespace firestore
} // namespace firebase
Empty file.
27 changes: 27 additions & 0 deletions Firestore/core/src/called_by_swift/pipeline_source.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2024 LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "Firestore/core/src/called_by_swift/include/pipeline_source.h"

PipelineSource::PipelineSource() {
}

Pipeline PipelineSource::GetCollection(const std::string collection_path) {
}

Pipeline PipelineSource::GetDocuments(
const std::vector<DocumentReference> docs) {
}
Loading