1# *************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20# *************************************************************
21
22How to write my own sdbc driver
23
24all example files can be found in connectivity/workben/skeleton
25
26Pre implementation steps
27- copy all files from connectivity/workben/skeleton into your new created directory under
28  connectivity/source/drivers and rename the first char of the files to one which isn't used so far
29  ( please have a look at the other drivers )
30- search all occurances of skeleton and replace them to a name which you prefer
31
321. Implement a class called driver or modify the existing skeleton	-> have a look at SDriver.?xx
332. Implement a class called connection								-> have a look at SConnection.?xx
343. Have a look at the DatabaseMetaData								-> see SDatabaseMetaData.cxx
35	The methods which should be implemented at least are
36		- getTableTypes
37		- getTables
38		- getTypeInfo
39		- getColumns
40
414. You need a statement to show/access some data					-> have a look at SStatement.cxx
42																	-> especially executeQuery()
43
445. The ResultSet: without you see nothing							-> look at SResultSet.cxx
456. The ResultSetMetaData needed to get some information about what are waiting for us
46																	-> look at SResultSetMetaData.cxx
47
487. The prepared statement is the last class we have to implement now
49	-> you have to allow statements like "SELECT * FROM table WHERE id = ?"
50
51
528. insert entry in version.mk
53# ----------------------------SKELETON settings-----------------------------------#
54# target
55SKELETON_TARGET=skeleton
56
57# the major
58SKELETON_MAJOR=2
59# the minor
60SKELETON_MINOR=0
61# the micro
62SKELETON_MICRO=0
63
64# this is a c++ compatible library
65SKELETON_CPP=1
66
67SKELETON=$(SKELETON_TARGET_TARGET)_$(CMPEXT)
68
69
709. copy dll to program dir of office and register the dll
71
7210. congratulations you have now implement your own driver :-)
73