1760cb77fSAndrew Rist# ************************************************************* 2760cb77fSAndrew Rist# 3760cb77fSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4760cb77fSAndrew Rist# or more contributor license agreements. See the NOTICE file 5760cb77fSAndrew Rist# distributed with this work for additional information 6760cb77fSAndrew Rist# regarding copyright ownership. The ASF licenses this file 7760cb77fSAndrew Rist# to you under the Apache License, Version 2.0 (the 8760cb77fSAndrew Rist# "License"); you may not use this file except in compliance 9760cb77fSAndrew Rist# with the License. You may obtain a copy of the License at 10760cb77fSAndrew Rist# 11760cb77fSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12760cb77fSAndrew Rist# 13760cb77fSAndrew Rist# Unless required by applicable law or agreed to in writing, 14760cb77fSAndrew Rist# software distributed under the License is distributed on an 15760cb77fSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16760cb77fSAndrew Rist# KIND, either express or implied. See the License for the 17760cb77fSAndrew Rist# specific language governing permissions and limitations 18760cb77fSAndrew Rist# under the License. 19760cb77fSAndrew Rist# 20760cb77fSAndrew Rist# ************************************************************* 21760cb77fSAndrew Rist 22cdf0e10cSrcweirHow to write my own sdbc driver 23cdf0e10cSrcweir 24cdf0e10cSrcweirPre implementation steps 25*a893be29SPedro Giffuni- search all occurrences of skeleton and replace them to a name which you prefer 26cdf0e10cSrcweir 27cdf0e10cSrcweir1. Implement a class called driver or modify the existing skeleton -> have a look at SDriver.?xx 28cdf0e10cSrcweir2. Implement a class called connection -> have a look at SConnection.?xx 29cdf0e10cSrcweir3. Have a look at the DatabaseMetaData -> see SDatabaseMetaData.cxx 30cdf0e10cSrcweir The methods which should be implemented at least are 31cdf0e10cSrcweir - getTableTypes 32cdf0e10cSrcweir - getTables 33cdf0e10cSrcweir - getTypeInfo 34cdf0e10cSrcweir - getColumns 35cdf0e10cSrcweir 36cdf0e10cSrcweir4. You need a statement to show/access some data -> have a look at SStatement.cxx 37cdf0e10cSrcweir -> especially executeQuery() 38cdf0e10cSrcweir 39cdf0e10cSrcweir5. The ResultSet: without you see nothing -> look at SResultSet.cxx 40cdf0e10cSrcweir6. The ResultSetMetaData needed to get some information about what are waiting for us 41cdf0e10cSrcweir -> look at SResultSetMetaData.cxx 42cdf0e10cSrcweir 43cdf0e10cSrcweir7. The prepared statement is the last class we have to implement now 44cdf0e10cSrcweir -> you have to allow statements like "SELECT * FROM table WHERE id = ?" 45cdf0e10cSrcweir 46cdf0e10cSrcweir8. congratulations you have now implement your own driver :-) 47