1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package androidx.sqlite.db.framework
17 
18 import android.database.sqlite.SQLiteStatement
19 import androidx.sqlite.db.SupportSQLiteStatement
20 
21 /**
22  * Delegates all calls to a [SQLiteStatement].
23  *
24  * @param delegate The SQLiteStatement to delegate calls to.
25  * @constructor Creates a wrapper around a framework [SQLiteStatement].
26  */
27 internal class FrameworkSQLiteStatement(private val delegate: SQLiteStatement) :
28     FrameworkSQLiteProgram(delegate), SupportSQLiteStatement {
executenull29     override fun execute() {
30         delegate.execute()
31     }
32 
executeUpdateDeletenull33     override fun executeUpdateDelete(): Int {
34         return delegate.executeUpdateDelete()
35     }
36 
executeInsertnull37     override fun executeInsert(): Long {
38         return delegate.executeInsert()
39     }
40 
simpleQueryForLongnull41     override fun simpleQueryForLong(): Long {
42         return delegate.simpleQueryForLong()
43     }
44 
simpleQueryForStringnull45     override fun simpleQueryForString(): String? {
46         return delegate.simpleQueryForString()
47     }
48 }
49