@@ -139,7 +139,7 @@ def execute(sql, con, cur=None, params=None):
139
139
----------
140
140
sql : string
141
141
Query to be executed
142
- con : SQLAlchemy engine or sqlite3 DBAPI2 connection
142
+ con : SQLAlchemy connectable or sqlite3 DBAPI2 connection
143
143
Using SQLAlchemy makes it possible to use any DB supported by that
144
144
library.
145
145
If a DBAPI2 object, only sqlite3 is supported.
@@ -282,14 +282,14 @@ def read_sql_table(table_name, con, schema=None, index_col=None,
282
282
chunksize = None ):
283
283
"""Read SQL database table into a DataFrame.
284
284
285
- Given a table name and an SQLAlchemy engine , returns a DataFrame.
285
+ Given a table name and an SQLAlchemy connectable , returns a DataFrame.
286
286
This function does not support DBAPI connections.
287
287
288
288
Parameters
289
289
----------
290
290
table_name : string
291
291
Name of SQL table in database
292
- con : SQLAlchemy engine
292
+ con : SQLAlchemy connectable
293
293
Sqlite DBAPI connection mode not supported
294
294
schema : string, default None
295
295
Name of SQL schema in database to query (if database flavor
@@ -330,7 +330,7 @@ def read_sql_table(table_name, con, schema=None, index_col=None,
330
330
"""
331
331
if not _is_sqlalchemy_connectable (con ):
332
332
raise NotImplementedError ("read_sql_table only supported for "
333
- "SQLAlchemy engines ." )
333
+ "SQLAlchemy connectable ." )
334
334
import sqlalchemy
335
335
from sqlalchemy .schema import MetaData
336
336
meta = MetaData (con , schema = schema )
@@ -362,7 +362,7 @@ def read_sql_query(sql, con, index_col=None, coerce_float=True, params=None,
362
362
----------
363
363
sql : string
364
364
SQL query to be executed
365
- con : SQLAlchemy engine or sqlite3 DBAPI2 connection
365
+ con : SQLAlchemy connectable or sqlite3 DBAPI2 connection
366
366
Using SQLAlchemy makes it possible to use any DB supported by that
367
367
library.
368
368
If a DBAPI2 object, only sqlite3 is supported.
@@ -420,7 +420,7 @@ def read_sql(sql, con, index_col=None, coerce_float=True, params=None,
420
420
----------
421
421
sql : string
422
422
SQL query to be executed or database table name.
423
- con : SQLAlchemy engine or DBAPI2 connection (fallback mode)
423
+ con : SQLAlchemy connectable or DBAPI2 connection (fallback mode)
424
424
Using SQLAlchemy makes it possible to use any DB supported by that
425
425
library.
426
426
If a DBAPI2 object, only sqlite3 is supported.
@@ -504,14 +504,14 @@ def to_sql(frame, name, con, flavor='sqlite', schema=None, if_exists='fail',
504
504
frame : DataFrame
505
505
name : string
506
506
Name of SQL table
507
- con : SQLAlchemy engine or sqlite3 DBAPI2 connection
507
+ con : SQLAlchemy connectable or sqlite3 DBAPI2 connection
508
508
Using SQLAlchemy makes it possible to use any DB supported by that
509
509
library.
510
510
If a DBAPI2 object, only sqlite3 is supported.
511
511
flavor : {'sqlite', 'mysql'}, default 'sqlite'
512
- The flavor of SQL to use. Ignored when using SQLAlchemy engine .
512
+ The flavor of SQL to use. Ignored when using SQLAlchemy connectable .
513
513
'mysql' is deprecated and will be removed in future versions, but it
514
- will be further supported through SQLAlchemy engines .
514
+ will be further supported through SQLAlchemy connectables .
515
515
schema : string, default None
516
516
Name of SQL schema in database to write to (if database flavor
517
517
supports this). If None, use default schema (default).
@@ -557,14 +557,14 @@ def has_table(table_name, con, flavor='sqlite', schema=None):
557
557
----------
558
558
table_name: string
559
559
Name of SQL table
560
- con: SQLAlchemy engine or sqlite3 DBAPI2 connection
560
+ con: SQLAlchemy connectable or sqlite3 DBAPI2 connection
561
561
Using SQLAlchemy makes it possible to use any DB supported by that
562
562
library.
563
563
If a DBAPI2 object, only sqlite3 is supported.
564
564
flavor: {'sqlite', 'mysql'}, default 'sqlite'
565
- The flavor of SQL to use. Ignored when using SQLAlchemy engine .
565
+ The flavor of SQL to use. Ignored when using SQLAlchemy connectable .
566
566
'mysql' is deprecated and will be removed in future versions, but it
567
- will be further supported through SQLAlchemy engines .
567
+ will be further supported through SQLAlchemy connectables .
568
568
schema : string, default None
569
569
Name of SQL schema in database to write to (if database flavor supports
570
570
this). If None, use default schema (default).
@@ -581,7 +581,7 @@ def has_table(table_name, con, flavor='sqlite', schema=None):
581
581
582
582
_MYSQL_WARNING = ("The 'mysql' flavor with DBAPI connection is deprecated "
583
583
"and will be removed in future versions. "
584
- "MySQL will be further supported with SQLAlchemy engines ." )
584
+ "MySQL will be further supported with SQLAlchemy connectables ." )
585
585
586
586
587
587
def pandasSQL_builder (con , flavor = None , schema = None , meta = None ,
@@ -979,11 +979,11 @@ class PandasSQL(PandasObject):
979
979
"""
980
980
981
981
def read_sql (self , * args , ** kwargs ):
982
- raise ValueError ("PandasSQL must be created with an SQLAlchemy engine "
982
+ raise ValueError ("PandasSQL must be created with an SQLAlchemy connectable "
983
983
" or connection+sql flavor" )
984
984
985
985
def to_sql (self , * args , ** kwargs ):
986
- raise ValueError ("PandasSQL must be created with an SQLAlchemy engine "
986
+ raise ValueError ("PandasSQL must be created with an SQLAlchemy connectable "
987
987
" or connection+sql flavor" )
988
988
989
989
@@ -994,8 +994,8 @@ class SQLDatabase(PandasSQL):
994
994
995
995
Parameters
996
996
----------
997
- engine : SQLAlchemy Connectable (Engine or Connection)
998
- Engine to connect with the database. Using SQLAlchemy makes it
997
+ engine : SQLAlchemy connectable
998
+ Connectable to connect with the database. Using SQLAlchemy makes it
999
999
possible to use any DB supported by that library.
1000
1000
schema : string, default None
1001
1001
Name of SQL schema in database to write to (if database flavor
@@ -1024,7 +1024,7 @@ def run_transaction(self):
1024
1024
yield self .connectable
1025
1025
1026
1026
def execute (self , * args , ** kwargs ):
1027
- """Simple passthrough to SQLAlchemy engine """
1027
+ """Simple passthrough to SQLAlchemy connectable """
1028
1028
return self .connectable .execute (* args , ** kwargs )
1029
1029
1030
1030
def read_table (self , table_name , index_col = None , coerce_float = True ,
@@ -1620,12 +1620,12 @@ def get_schema(frame, name, flavor='sqlite', keys=None, con=None, dtype=None):
1620
1620
name : string
1621
1621
name of SQL table
1622
1622
flavor : {'sqlite', 'mysql'}, default 'sqlite'
1623
- The flavor of SQL to use. Ignored when using SQLAlchemy engine .
1623
+ The flavor of SQL to use. Ignored when using SQLAlchemy connectable .
1624
1624
'mysql' is deprecated and will be removed in future versions, but it
1625
1625
will be further supported through SQLAlchemy engines.
1626
1626
keys : string or sequence
1627
1627
columns to use a primary key
1628
- con: an open SQL database connection object or an SQLAlchemy engine
1628
+ con: an open SQL database connection object or a SQLAlchemy connectable
1629
1629
Using SQLAlchemy makes it possible to use any DB supported by that
1630
1630
library.
1631
1631
If a DBAPI2 object, only sqlite3 is supported.
@@ -1683,8 +1683,8 @@ def write_frame(frame, name, con, flavor='sqlite', if_exists='fail', **kwargs):
1683
1683
1684
1684
- With ``to_sql`` the index is written to the sql database by default. To
1685
1685
keep the behaviour this function you need to specify ``index=False``.
1686
- - The new ``to_sql`` function supports sqlalchemy engines to work with
1687
- different sql flavors.
1686
+ - The new ``to_sql`` function supports sqlalchemy connectables to work
1687
+ with different sql flavors.
1688
1688
1689
1689
See also
1690
1690
--------
0 commit comments