Commit Graph

74 Commits

Author SHA1 Message Date
Tamas Bunth
f80b51ae44 tdf#104734 Firebird improve XClob implementation
Create a more effective implementation of XClob::length() and
XClob::getSubString() methods, where string is read segment-by-segment
instead of reading the whole underlying blob. That way it is possible to
handle big texts which would not fit into memory.

Also allow reading Clob data from a resultset with getString() and
writing it in a prepared statement with setString().

Implement XPreparedStatement::setClob(). Also implement a private
version of setClob() for creating a clob from OUString:

Allow the creation of a clob column with GUI by adding a new type in
ODataBaseMetaData::getTypeInfo().

Change-Id: Ibcbbdd80e8eed5e2a3fe55b0fa196401f1bcbcdf
Reviewed-on: https://gerrit.libreoffice.org/47093
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-12-28 11:28:20 +01:00
Tamas Bunth
032a3e3713 Firebird: Revert not closing cursor,..
..but suppress error of closing closed cursor

Change-Id: I58f96f02f3f600a089bde361ed3e46a03a4902d4
Reviewed-on: https://gerrit.libreoffice.org/46141
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09 13:58:52 +01:00
Tamas Bunth
907423a6ec clean code at setObjectWithInfo
Change-Id: I8cb4eaebd71d8b06523230954da15d73325ac94b
Reviewed-on: https://gerrit.libreoffice.org/46130
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09 12:04:54 +01:00
Tamas Bunth
9585521c28 tdf#70425 do not close cursor explicitly
A cursor need only be closed in this manner if it was previously
opened and associated with stmt_handle by isc_dsql_set_cursor_name()

See Interbase API Guide: isc_dsql_free_statement

Change-Id: Iadb0dcf83ee58b6196112c44d922528a3f56f7ea
Reviewed-on: https://gerrit.libreoffice.org/46132
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09 12:02:59 +01:00
Tamas Bunth
9ccc1f5944 tdf#70425 Firebird: accept integers in setDouble
Change-Id: I471197a9c60ca28b93be0974956e5e1d90f843ca
Reviewed-on: https://gerrit.libreoffice.org/46125
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-12-09 12:02:37 +01:00
Stephan Bergmann
41dbfa9ec7 loplugin:casttovoid: connectivity
Change-Id: I03127890499dac67816bb43a8c3fb9dd87eefcab
2017-07-02 22:34:08 +02:00
Jochen Nitschke
959496794c cleanup osl/diagnose.h includes
with command
> git grep -l osl/diagnose.h *.cxx |
  xargs grep -L -w 'OSL_\w*' |
  xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'

headers need more work

Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09 15:41:46 +02:00
Jochen Nitschke
da56de9ac4 remove type decorations on char literals
they are only needed where type deduction fails.
left them in defines for now.

Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30 12:21:40 +00:00
Caolán McNamara
13de958fc3 loplugin:redundantcast toNumericWithoutDecimalPlace returns sal_Int64 already
Change-Id: Iccb11bb5067d6de06ff8786c0acd1af27ffaf8fd
2017-03-23 16:37:33 +00:00
Andrea Gelmini
7bc1c43800 Fix typos/translations, following 04644956e5
No automatic tools

Change-Id: I3a6d18760f90c4ee02b9380758f97f6fca6c4428
Reviewed-on: https://gerrit.libreoffice.org/30874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-02-21 13:34:20 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Julien Nabet
dbc3cfb011 tdf#104858: fix typo
Thank you to himajin100000@gmail.com for having noticed this.

Change-Id: I81da0d4fc91faf95f4f5257d5834a9fdfd2618f7
Reviewed-on: https://gerrit.libreoffice.org/32378
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2016-12-23 10:15:44 +00:00
Wastack
1d0f3649ba tdf#103074 Implement Boolean Type for FB driver
Change-Id: Ibed5435e23730dc901155e79152e9becd3e70566
Reviewed-on: https://gerrit.libreoffice.org/31262
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-12-11 10:43:22 +00:00
Wastack
3ec084d61e get table name from resultset simply
There is a much simpler way to access table name in ResultSetMetadata
in Firebird sdbc which I didn't notice before.

Change-Id: Ib306c04acf38ec86475d8d1a22a67012fe48539e
Reviewed-on: https://gerrit.libreoffice.org/30931
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-11-21 17:10:52 +00:00
Wastack
a2686cc717 tdf#74172 ensure prepared while setting numeric
Change-Id: I727a0af5c3aa1b2e1f6c251b2dcb32feb46041d6
Reviewed-on: https://gerrit.libreoffice.org/30933
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-11-21 16:54:25 +00:00
Caolán McNamara
1ef8ab3ed7 coverity#1394295 Unchecked return value
Change-Id: Ie4edbe91ab4f9b9910fc895e47ea8b9fdfc00b7e
2016-11-12 12:23:08 +00:00
Stephan Bergmann
25edea0637 loplugin:staticmethods
Change-Id: Id7d7bb572466bcc803ac424cd8ddb64205a1c273
2016-11-10 11:50:02 +01:00
Stephan Bergmann
be8d620464 loplugin:stringconstant
Change-Id: I0eb2b9986840b1bd5bc892da23c56205047bc120
2016-11-10 11:48:04 +01:00
Wastack
21cc1826c7 WiP tdf#74172 use DECIMAL and NUMERIC data types
Change-Id: I917cdf6e8d3ebfa7c9e4a52ca61adc5b8707ecfc
Reviewed-on: https://gerrit.libreoffice.org/30447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-11-10 09:37:12 +00:00
Wastack
0a91231523 tdf#69949 GSoC Firebird implement autoincrement
Change-Id: I6fe08b575f01b986f0a3c96b341f254279427b68
Reviewed-on: https://gerrit.libreoffice.org/28062
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Jenkins <ci@libreoffice.org>
2016-08-18 12:25:18 +00:00
Wastack
3828e10f7c tdf#91324 correct firebird date format
Store date inside the embedded firebird database as:
Years as the years since 1900.
Months from 0 to 11.

Change-Id: Ic6269a183261c4c482f91f0d3871b42c54d4b99f
Reviewed-on: https://gerrit.libreoffice.org/28173
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-17 13:15:31 +00:00
Michael Stahl
3fecccad4a connecitivty: [loplugin:nullptr]
Change-Id: Ic717e1d119e1a5b8a87caca263322d9e58fe6c68
2016-06-21 18:20:27 +02:00
Noel Grandin
a52231c785 com::sun::star->css in connectivity
Change-Id: I9489e92dc89a6d83a26ff4f0d9aad26acd28ad9f
Reviewed-on: https://gerrit.libreoffice.org/25537
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 08:37:11 +00:00
Caolán McNamara
d7e1e8da8b coverity#1352212 Unchecked return value
Change-Id: I75a6853a6708585201dbc4722e7a19cd568a48f7
2016-03-01 10:45:06 +00:00
Noel Grandin
414a66587b convert StandardSQLState to scoped enum
Change-Id: Ia0a1526140cfed35a73a6fea1a173d2fb5005960
2016-02-25 13:50:26 +02:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Lionel Elie Mamane
85f17f9ea8 tdf#96572 firebird correctly transmit request for NULL
even if column is not nullable

Change-Id: I72ceda68e983125aef26c8f0aacc06320bd16b77
2015-12-18 16:57:42 +01:00
Noel Grandin
ec3f724158 loplugin:unusedfields
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
2015-11-30 10:34:38 +02:00
Stephan Bergmann
c0bd59c15b loplugin:nullptr (automatic rewrite)
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
2015-11-10 10:31:20 +01:00
Noel Grandin
8601307838 loplugin: defaultparams
Change-Id: Id0a933d3507bc0f8145afa04effadf8475c8e210
2015-08-14 10:52:46 +02:00
Stephan Bergmann
1b42acc95e Clean up C-style casts from pointers to void
Change-Id: I6c7c31befd61cbf0800a62c08e7395ddf78e4b30
2015-03-28 19:09:18 +01:00
Stephan Bergmann
141b01ac65 Some more loplugin:cstylecast: connectivity
Change-Id: Iee1d11aef454284dbe050780c4308917c1a2b36f
2015-01-20 09:06:46 +01:00
Michael Stahl
137131b1e0 connectivity: firebird: fix Connection leak in OStatementCommonBase
bin/refcount_leak.py was very helpful here.

Change-Id: I61dc57408cf1533f733c08b701884851ec6afb8d
2014-10-21 15:08:51 +02:00
Noel Grandin
fc04f76336 fdo#82577: Handle Time
Put the TOOLS Time class in the tools namespace. Avoids clash with the X11
Time typedef.

Change-Id: Iac57d5aef35e81ace1ee0d5e6d76cb278f8ad866
Reviewed-on: https://gerrit.libreoffice.org/11684
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-01 07:34:23 +00:00
Caolán McNamara
968f633b24 coverity#706382 Uncaught exception
and

coverity#706377
coverity#706378
coverity#706382

Change-Id: I17f672e31867b1be77c16a8a6e121a8f67df7c90
2014-07-01 16:43:05 +01:00
Norbert Thiebaud
f7453024e1 fdo#80574 firebird memory management issues
Change-Id: I37438cd3f9c8e197e5a3aa3d9cbcc5bf3681d792
2014-06-27 23:37:51 +02:00
Stephan Bergmann
5e21a413c7 cppuhelper: retrofit std::exception into overriding exception specs
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-26 18:22:20 +01:00
Alexander Wilms
0ce0c369aa Remove unneccessary comments
Change-Id: I939160ae72fecbe3d4a60ce755730bd4c38497fb
Reviewed-on: https://gerrit.libreoffice.org/8182
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-23 03:38:49 +00:00
Lionel Elie Mamane
b065cddb0a TODO comment
Change-Id: I3df4810534d64bb7f546cc18124edb6ebf3a147d
2014-01-30 06:13:45 +01:00
Lionel Elie Mamane
5e951de925 fdo#74160 firebird XParameters::setString truncate to 65535 characters
as opposed to 17 characters

Change-Id: I65c82243946c22eee0f033977b1cd0c5a84d226b
2014-01-30 06:13:44 +01:00
Tor Lillqvist
51145fa544 WaE: C4701: potentially uninitialized local variable 'aErr' used
Change-Id: I420a103fc62091319ec2d466c037d7c6631dde5d
2014-01-03 12:32:52 +02:00
Andrzej Hunt
cb4b290bcf fdo#70664 Implement Blob writing (firebird-sdbc).
Change-Id: Ia95c6e1a0ede2103aae25610baeb3c7a9642113a
2014-01-01 19:10:17 +00:00
Andrzej J.R. Hunt
acef4b2687 fdo#70144 Mark database document as modified when data inserted in firebird.
This only applies to embedded databases where any changes to the database
only affect the temporary extracted db which still has to be stored into
the .odb.

This only fixes the status for modification/insertion/deletion of data
in existing tables. Insertion of new tables still does not result
in the modified state being set.

Change-Id: I553f67127672f2cf49b98ddcdf7d25f22bef5074
Reviewed-on: https://gerrit.libreoffice.org/6621
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2013-11-14 11:50:29 +00:00
Andrzej J.R. Hunt
65719df3e3 Cleanup exceptions in PreparedStatement.
Change-Id: Ice11ec8131a00335db48a05661bbe0285bb53fea
2013-09-19 20:37:55 +01:00
Andrzej J.R. Hunt
52841daec9 Throw sane exception when wrong type used in PreparedStatement.
Change-Id: Ie9577ed021930c56f3270aa30306d89365c1b3b1
2013-09-19 20:37:54 +01:00
Andrzej J.R. Hunt
a11b6d5356 Don't throw unnecessary exception.
Even an empty ResultSet can be valid, and no other drivers do this.

Change-Id: Ie3aee718f0187d039dbd0c53fc32a71be4a1d9e9
2013-09-19 20:37:54 +01:00
Andrzej J.R. Hunt
9ae206996d Ensure we have prepared the statement before modify null.
Currently if the first set* method to be called is setNull, then
we segfault since we try to access m_pInSqlda which doesn't exist
yet.

Change-Id: I4ad9c0a7d68da11b2260a596dd95c4c2cb5bcd4c
2013-09-11 18:40:43 +01:00
Andrzej J.R. Hunt
87bd0c8c8f Reintroduce Statement specific mutexes. (firebird-sdbc)
This replaces the erronous Connection wide mutex. Libfbembed
is multithreaded hence we don't need a connection wide mutex.

Change-Id: Ifae79cdefecfe6597a535e36bda318563092bf6c
2013-09-10 19:52:00 +01:00
Andrzej J.R. Hunt
5b74c6563c Cleanup Connection and rename from OConnection. (firebird-sdbc)
Change-Id: I06cfdc29d7613638d3cea080e7b39c67c74d4de0
2013-09-09 19:52:27 +01:00
Andrzej J.R. Hunt
0dbe580f0f Some stylistic cleanup in PreparedStatement.
Change-Id: Idaddaeff58fa9433c678e7913435ad81bd615934
2013-09-06 21:27:58 +01:00