11
2- ########################
3- Getting Started with IDB
4- ########################
2+ ##############################
3+ Getting Started with Interbase
4+ ##############################
55
66Installation
77************
88
9- IDB is written as pure-Python module on top of InterBase client library (gds.so/dylib and gds32/ibclient64.dll) using ctypes_,
10- so *make sure you have InterBase client properly installed before you try to install IDB *, otherwise the
11- installation will fail. IDB supports InterBase 2020 and higher.
9+ Interbase is written as pure-Python module on top of InterBase client library (gds.so/dylib and gds32/ibclient64.dll) using ctypes_,
10+ so *make sure you have InterBase client properly installed before you try to install Interbase *, otherwise the
11+ installation will fail. Interbase supports InterBase 2020 and higher.
1212
13- IDB is distributed as `setuptools`_ package, so you'll need setuptools or
13+ Interbase is distributed as `setuptools`_ package, so you'll need setuptools or
1414`compatible package <http://pypi.python.org/pypi/distribute>`_ installed to
15- install IDB properly.
15+ install Interbase properly.
1616
1717Installation using pip
1818========================
1919
20- $ pip install git+ssh://git@github.com/Embarcadero/PythonInterBase .git
20+ $ pip install git+ssh://git@github.com/Embarcadero/InterBasePython .git
2121
2222Installation from source
2323========================
2424
2525Download the source tarball, uncompress it, then run the install command::
2626
27- $ git clone https://github.com/Embarcadero/PythonInterBase .git
27+ $ git clone https://github.com/Embarcadero/InterBasePython .git
2828 $ python setup.py install
2929
30- .. _setuptools: https://github.com/Embarcadero/PythonInterBase
30+ .. _setuptools: https://github.com/Embarcadero/InterBasePython
3131.. _PYPI: http://pypi.python.org
3232.. _ctypes: http://docs.python.org/library/ctypes.html
3333
@@ -36,11 +36,11 @@ Quick-start Guide
3636*****************
3737
3838This brief tutorial aims to get the reader started by demonstrating
39- elementary usage of IDB . It is not a comprehensive Python
39+ elementary usage of Interbase . It is not a comprehensive Python
4040Database API tutorial, nor is it comprehensive in its coverage of
4141anything else.
4242
43- The numerous advanced features of IDB are covered in another
43+ The numerous advanced features of Interbase are covered in another
4444section of this documentation, which is not in a tutorial format, though it
4545is replete with examples.
4646
@@ -55,13 +55,13 @@ A database connection is typically established with code such as this:
5555
5656.. sourcecode:: python
5757
58- import idb
58+ import interbase
5959
6060 # The server is named 'bison'; the database file is at '/temp/test.db'.
61- con = idb .connect(dsn='bison:/temp/test.db', user='sysdba', password='pass')
61+ con = interbase .connect(dsn='bison:/temp/test.db', user='sysdba', password='pass')
6262
6363 # Or, equivalently:
64- con = idb .connect(
64+ con = interbase .connect(
6565 host='bison', database='/temp/test.db',
6666 user='sysdba', password='masterkey'
6767 )
@@ -74,9 +74,9 @@ UTF-8 as the character set of the connection:
7474
7575.. sourcecode:: python
7676
77- import idb
77+ import interbase
7878
79- con = idb .connect(
79+ con = interbase .connect(
8080 dsn='bison:/temp/test.db',
8181 user='sysdba', password='masterkey',
8282 charset='UTF8' # specify a character set for the connection
@@ -108,9 +108,9 @@ the `languages` table:
108108
109109.. sourcecode:: python
110110
111- import idb
111+ import interbase
112112
113- con = idb .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
113+ con = interbase .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
114114
115115 # Create a Cursor object that operates in the context of Connection con:
116116 cur = con.cursor()
@@ -136,9 +136,9 @@ fetching a single row at a time from a `SELECT`-cursor:
136136
137137.. sourcecode:: python
138138
139- import idb
139+ import interbase
140140
141- con = idb .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
141+ con = interbase .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
142142
143143 cur = con.cursor()
144144 SELECT = "select name, year_released from languages order by year_released"
@@ -179,19 +179,19 @@ example to `languages`):
179179
180180.. sourcecode:: python
181181
182- import idb
182+ import interbase
183183
184184 TABLE_NAME = 'languages'
185185 SELECT = 'select * from %s order by year_released' % TABLE_NAME
186186
187- con = idb .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
187+ con = interbase .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
188188
189189 cur = con.cursor()
190190 cur.execute(SELECT)
191191
192192 # Print a header.
193193 for fieldDesc in cur.description:
194- print fieldDesc[idb .DESCRIPTION_NAME].ljust(fieldDesc[idb .DESCRIPTION_DISPLAY_SIZE]) ,
194+ print fieldDesc[interbase .DESCRIPTION_NAME].ljust(fieldDesc[interbase .DESCRIPTION_DISPLAY_SIZE]) ,
195195 print # Finish the header with a newline.
196196 print '-' * 78
197197
@@ -201,7 +201,7 @@ example to `languages`):
201201 for row in cur:
202202 for fieldIndex in fieldIndices:
203203 fieldValue = str(row[fieldIndex])
204- fieldMaxWidth = cur.description[fieldIndex][idb .DESCRIPTION_DISPLAY_SIZE]
204+ fieldMaxWidth = cur.description[fieldIndex][interbase .DESCRIPTION_DISPLAY_SIZE]
205205
206206 print fieldValue.ljust(fieldMaxWidth) ,
207207
@@ -224,9 +224,9 @@ Let's insert more languages:
224224
225225.. sourcecode:: python
226226
227- import idb
227+ import interbase
228228
229- con = idb .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
229+ con = interbase .connect(dsn='bison:/temp/test.db', user='sysdba', password='masterkey')
230230
231231 cur = con.cursor()
232232
@@ -281,7 +281,7 @@ retrieved from a stored procedure by `SELECT`ing from the procedure,
281281whereas output parameters are retrieved with an `EXECUTE PROCEDURE`
282282statement.
283283add
284- To *retrieve a result set* from a stored procedure with IDB ,
284+ To *retrieve a result set* from a stored procedure with Interbase ,
285285use code such as this:
286286
287287.. sourcecode:: python
0 commit comments