Renamed project to sqlbase7_sa.
This commit is contained in:
parent
b52b7773c8
commit
2cffcc8d19
7 changed files with 33 additions and 33 deletions
43
sqlbase7_sa/pyodbc.py
Normal file
43
sqlbase7_sa/pyodbc.py
Normal file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
################################################################################
|
||||
#
|
||||
# SQLBase7_SA -- SQLAlchemy driver/dialect for Centura SQLBase v7
|
||||
# Copyright © 2010 Lance Edgar
|
||||
#
|
||||
# This file is part of SQLBase7_SA.
|
||||
#
|
||||
# SQLBase7_SA is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# SQLBase7_SA is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with SQLBase7_SA. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
from sqlalchemy.connectors.pyodbc import PyODBCConnector
|
||||
|
||||
from sqlbase7.base import SQLBase7Dialect
|
||||
|
||||
|
||||
class SQLBase7_pyodbc(PyODBCConnector, SQLBase7Dialect):
|
||||
|
||||
def create_connect_args(self, url):
|
||||
connection_string = "DRIVER={Centura SQLBase 3.5 32-bit Driver -NT & Win95};SERVER=%s;DATABASE=%s;UID=%s;PWD=%s" % (
|
||||
url.host,
|
||||
url.database,
|
||||
url.username,
|
||||
url.password,
|
||||
)
|
||||
return [connection_string], {}
|
||||
|
||||
|
||||
dialect = SQLBase7_pyodbc
|
Loading…
Add table
Add a link
Reference in a new issue