1/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is distributed on an "AS IS" BASIS,
11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15#include "tensorflow/core/kernels/data/experimental/sql/driver_manager.h"
16#include "tensorflow/core/kernels/data/experimental/sql/sqlite_query_connection.h"
17
18namespace tensorflow {
19namespace data {
20namespace experimental {
21namespace sql {
22
23std::unique_ptr<QueryConnection> DriverManager::CreateQueryConnection(
24 const string& driver_name) {
25 if (driver_name == "sqlite") {
26 return std::unique_ptr<SqliteQueryConnection>(new SqliteQueryConnection());
27 } else { // TODO(b/64276826, b/64276995) Add support for other db types.
28 // Change to registry pattern.
29 return nullptr;
30 }
31}
32
33} // namespace sql
34} // namespace experimental
35} // namespace data
36} // namespace tensorflow
37