Commit Graph

25 Commits

Author SHA1 Message Date
a839827f59 CONPY-189: Windows build fix for Visual Studio 2022
- Build parameters are now written to config_win.h instead of passing
  them as command line parameters
- Fixed several compiler warnings
2021-12-21 08:21:04 +01:00
263f428213 CONPY-184
Display status of connection, cursor and pool class in
string representation.

If an object (cursor, class, connection pool) was closed, the
string representation (tp_repr) now shows the status of the object.

Example:

>>> import mariadb
>>> connection=mariadb.connect()
>>> connection
<mariadb.connection connected to 'localhost' at 0x7f94d77c3b40>
>>> connection.close()
>>> connection
<mariadb.connection (closed) at 0x7f94d77c3b40>
2021-12-13 05:55:10 +01:00
eb48926845 Fix for CONPY-175:
Since memory for stack allocation is limited, we need to allocate
memory from the heap, otherwise in case of large strings escape_string
method might crash.
2021-11-02 11:15:51 +01:00
9d472c2596 Fix for CONPY-159:
Insted of parsing a short int (16 bits, "h" option in PyArg_ParseTuple) we need
to parse 32bit option "i"
2021-08-22 08:09:52 +02:00
2e7dcde73b Removed converter from C Code 2021-08-16 10:41:07 +02:00
6bbe0260a7 Moved MemberDef properties
Mostly all properties moved to Python code
2021-08-16 10:08:15 +02:00
47ca11d921 Documentation update 2021-08-01 10:31:10 +02:00
ebb09cf56e Documentation 2021-07-28 06:55:10 +02:00
6c6e1005eb remove commit/rollback from c code 2021-07-23 11:07:43 +02:00
ea97f66769 connection class:
moved kill method to python class
2021-07-22 16:06:27 +02:00
5870f5d4d7 cursor:
added keyword quote_sequences (default=true)

connection:

moved tpc functions to native python
moved autocommit to native python
2021-07-22 14:15:53 +02:00
2bd40ca1de Test fixes 2021-07-18 18:16:38 +02:00
84df56ce40 connection and cursor class are now written in
native python
2021-07-12 09:46:05 +02:00
27730cd018 Moved more methods and propertys from C to Python code 2021-03-21 22:44:42 +01:00
aa65cc853a Exchanged C written connection pool class by native python class. 2021-01-18 06:11:03 +01:00
7df428ecf8 Moved Objects from c to python code
Indicator, BINARY, NUMBER, STRING and DATE objects were moved
to python code
2020-11-30 16:49:16 +01:00
e8d7854fef codespell typo fixes 2020-11-25 13:44:18 +01:00
acf9f9190e Fix for CONPY-127: Let connector accept None values
Fix implementation of connection method: String values
now additionally except None values which will be
internally transformed to NULL.
2020-11-16 11:15:22 +01:00
a47d3e5d76 Implementation of CONPY-129:
Added connection attribute server_version_info and (for compatibiliry)
get_server_version() method.
Both return a tuple, describing the version number of connected server
in following format: (MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
2020-11-16 10:03:05 +01:00
37864dd831 Fix for CONPY-126
Connection attributes in PyMember definition will be accessed as
string constants instead of Python Object, so the object will be
created only if the member will be accessed in python code and it's
reference count doesn't need to be decrement when the connection
class will be deallocated.
2020-11-01 09:14:11 +01:00
bce98d74cd Fix for CONPY-118: Leak when using text protocol
Removed statement allocation from the cursor init function and
allocate it only in executemany and execute if paraemters were
supplied.
2020-10-02 12:52:09 +02:00
3f95456824 CONPY-117: Added converter support
The connect() method now accepts an addtional parameter
converter which points to a dictionary, containing one or more conversions.
A conversion must be specified in the form {FIELD_TYOE : conversion_function}
2020-09-29 13:21:13 +02:00
e807101db2 Fix for CONC-110
Fixed a small typo (b instead of p) which caused a memory overrun
when parsing dsn keywords for connection and using keyword 'ssl'.
2020-09-04 13:31:17 +02:00
0e91d76d52 Fix for CONPY-102:
Fixed default behavior of autocommit: If not autocommit mode was specified,
autocommit will be off by default (see https://www.python.org/dev/peps/pep-0249/#commit).
Added new keyword autocommit for connection class which might have the following values:
- None: use server default setting
- True: turns autocommit on
- False: turns autocommit off
2020-08-12 14:19:02 +02:00
29b05e3b09 Various fixes and changes for SQLAlchemy support:
- added a thin python wrapper around mariadb module
- added constansts under mariadb.constants (CLIENT, CURSOR, INDICATOR)
- bench and test are now in testing subdirectory
- updated documentation
2020-07-24 12:13:31 +02:00