1 /*
2  * Copyright (C) 2017 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.SQLiteProgram
19 import androidx.sqlite.db.SupportSQLiteProgram
20 
21 /** A wrapper around [SQLiteProgram] to implement [SupportSQLiteProgram] API. */
22 internal open class FrameworkSQLiteProgram(private val delegate: SQLiteProgram) :
23     SupportSQLiteProgram {
bindNullnull24     override fun bindNull(index: Int) {
25         delegate.bindNull(index)
26     }
27 
bindLongnull28     override fun bindLong(index: Int, value: Long) {
29         delegate.bindLong(index, value)
30     }
31 
bindDoublenull32     override fun bindDouble(index: Int, value: Double) {
33         delegate.bindDouble(index, value)
34     }
35 
bindStringnull36     override fun bindString(index: Int, value: String) {
37         delegate.bindString(index, value)
38     }
39 
bindBlobnull40     override fun bindBlob(index: Int, value: ByteArray) {
41         delegate.bindBlob(index, value)
42     }
43 
clearBindingsnull44     override fun clearBindings() {
45         delegate.clearBindings()
46     }
47 
closenull48     override fun close() {
49         delegate.close()
50     }
51 }
52