Commit Graph

70 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
Noel Grandin
9a06b99d2f loplugin:salcall fix non-virtual methods
first, since those are safer to change than virtual methods

Change-Id: Ie3b624019d75ee2b793cee33b3c5f64e994e8bfe
Reviewed-on: https://gerrit.libreoffice.org/45798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-05 07:32:46 +01:00
Noel Grandin
2a612907ae loplugin:flatten in connectivity..desktop
Change-Id: Iff59d3049ba40b4338ef8eec67d08a96b0834d2b
Reviewed-on: https://gerrit.libreoffice.org/42578
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21 15:41:50 +02:00
Noel Grandin
621c1201f7 loplugin:unnecessaryparen in connectivity
Change-Id: Iee4b0caa2eb7ad6d335f55adc19e7ed78b34335c
2017-09-04 11:57:11 +02:00
Noel Grandin
2e8acde112 remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:25:21 +02:00
Stephan Bergmann
41dbfa9ec7 loplugin:casttovoid: connectivity
Change-Id: I03127890499dac67816bb43a8c3fb9dd87eefcab
2017-07-02 22:34:08 +02:00
Tamás Bunth
4a193d39fb tdf#105101 check scale to determine subtype
For computed decimal/numeric values firebird's subtype remains 0. In
this case we check for the scale of column. If it is not 0 (negative),
than imply numeric.

Change-Id: Ie5a023d165852fe402b3b4cac817b0bbef58e7cd
Reviewed-on: https://gerrit.libreoffice.org/33660
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Tamás Bunth <btomi96@gmail.com>
2017-01-30 14:57:40 +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
Tamás Bunth
882db8709f tdf#70433 tdf#104734 implement sdbc XClob
And use it in getClob, so LO can display clob values like the return
value of the built-in List function.

Change-Id: I395016e945dbeb2c6bb3737b6345d40ff9f48089
Reviewed-on: https://gerrit.libreoffice.org/32938
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2017-01-14 12:13:32 +00:00
Stephan Bergmann
385f624027 Prevent use of ORowSetValue with sal_Bool as TINYINT
sal_Bool and sal_uInt8 are typedefs for the same underlying type, so any use of
ORowSetValue with sal_Bool instead of bool, apparently intending to treat the
value as a boolean, actually treated it as a TINYINT.  (See e.g. recent
7b0c57b2fa "some compilers don't like implicit
bool-to-ORowSetValue conversion".)

Now that there's no way to create a sal_uInt8 ORowSetValue, getUInt8 and the
m_uInt8 union member can probably go away, too.

Change-Id: Ia27554f76e7e9edce6410284b578064573e54fd3
Reviewed-on: https://gerrit.libreoffice.org/31909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-12 18:02:57 +00:00
Lionel Elie Mamane
7b0c57b2fa some compilers don't like implicit bool-to-ORowSetValue conversion
Change-Id: Ic4463db8aeca6ae9a86f7b890f95eb73724c6a1b
2016-12-12 07:49:46 +01: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
Julien Nabet
8d2f58a992 tdf#104227: fix subtypes DECIMAL/NUMERIC in resultset
bt here:
https://bug-attachments.documentfoundation.org/attachment.cgi?id=129298

See also https://bugs.documentfoundation.org/show_bug.cgi?id=104227#c13 for more details

Change-Id: Ied497cfff2f71e67161d541b90fe48bb3e2456b9
Reviewed-on: https://gerrit.libreoffice.org/31593
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96@gmail.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-12-04 18:22:24 +00:00
Stephan Bergmann
7222ffb79c Rewrite some (trivial) assignments inside if/while conditions: connectivity
Change-Id: I67d4bb92db04b5103b98a2855ae6069a054f171b
2016-11-29 17:21:33 +01: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
Stephan Bergmann
14544da21e loplugin:cstylecast
Change-Id: I6ec274c6c546f60c23fe639002d751f0a9f11d33
2016-11-10 11:38:27 +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
nadith
833d952a57 tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
Change-Id: I4abcff5e1bf050bd4e4cf0695f196c418d8229ef
Reviewed-on: https://gerrit.libreoffice.org/29778
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-14 06:36:35 +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
70a295ea33 tdf#91324 GSoC adapt struct tm correctly for date
Change-Id: Id0413d735eeeb506b6e706c5d31e7bf989ab5e41
Reviewed-on: https://gerrit.libreoffice.org/27592
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-08-11 12:48:58 +00:00
Wastack
88346f606a tdf#91324 GSoC adapt struct tm correctly
Change-Id: I645ebe888186e550b95dd072e063260bc69aa178
Reviewed-on: https://gerrit.libreoffice.org/27120
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2016-07-15 11:15:49 +00: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
Stephan Bergmann
15e410e5af loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I6fada7331ee369c35cbe019db4e730ce56cd1a1f
2016-04-20 17:25:37 +02: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
Stephan Bergmann
c0bd59c15b loplugin:nullptr (automatic rewrite)
Change-Id: Iefeeb51c2b101c097a8d77a4625f84baf1f2da44
2015-11-10 10:31:20 +01:00
Stephan Bergmann
373a9b9bb6 loplugin:redundantcast: redundant const_cast followed by implicit upcast
Change-Id: I58297ba336d96358eb0683684bbd763870ef56cb
2015-04-13 12:36:36 +02:00
Stephan Bergmann
17e74bf1a0 Replace remaining getCppuType et al with cppu::UnoType
Change-Id: Id2361bd7b50f4724211661b024583b8a3445500b
2015-04-01 08:36:20 +02:00
Stephan Bergmann
a52cf476e7 Clean up template-parameter-dependent C-style casts
Change-Id: Ia1ab134a0afbeeb3ae40264bd4233a47df26b734
2015-03-29 15:13:45 +02:00
Stephan Bergmann
141b01ac65 Some more loplugin:cstylecast: connectivity
Change-Id: Iee1d11aef454284dbe050780c4308917c1a2b36f
2015-01-20 09:06:46 +01:00
Noel Grandin
0371a63365 remove unnecessary 'using namespace rtl' declarations
It turns out that almost none of them were necessary.

Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83
Reviewed-on: https://gerrit.libreoffice.org/12133
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-10-29 11:28:54 +00: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
Lionel Elie Mamane
d2d2136f3f fdo#73352 firebird don't claim to support interfaces one doesn't
and then throw an exception when the interface is used

Change-Id: Id5e2c852323d49f51ab55cf46ab54223cf8ccf03
Reviewed-on: https://gerrit.libreoffice.org/9590
Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu>
Tested-by: Lionel Elie Mamane <lionel@mamane.lu>
2014-05-31 03:57:26 +00: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
a904aa609d firebird driver: do not assume sizeof(short) == 2
Change-Id: I4b4e6caa34c23baa75a87cf1750dce3ca3ae8aed
2014-01-30 06:13:47 +01:00
Noel Grandin
1bdb2b6f06 remove unnecessary use of OUString constructor in CONNECTIVITY module
Change-Id: Ie32d03920d996db2793ead9940fc90668cde03dd
2013-11-11 11:21:25 +02:00
Julien Nabet
124beed407 Resolves: fdo#71062 Embedded Firebird - Tables with Date-fields let LO crash
Change-Id: Ie28a1e8765ab9ff6eb345198d6ea223e25429e11
2013-11-01 18:01:35 +01:00
Andrzej J.R. Hunt
0ef3db3563 Remove redundant comment.
Change-Id: I317f83e8aca7f61148385763bc1f0a78a84530d8
2013-10-27 19:30:19 +00:00
Marcos Paulo de Souza
2b91dc3ae6 fdo#54938: Adapt connectivity module to use cppu::supportsService
Change-Id: I885b4c7a60ff51d44138c4f8a56a584c38a9804a
Reviewed-on: https://gerrit.libreoffice.org/6172
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-10-09 15:03:38 +00:00
Andrzej J.R. Hunt
c856ab73af Cleanup ResultSet exceptions.
Change-Id: I77e4fd5fffe45446050f8a1dfbcc8cc27290c786
2013-09-19 20:37:55 +01:00
Andrzej J.R. Hunt
101040a130 Set sane default for type.
Change-Id: Ib63e6abd7b378671d1e01bf9357dd811ae88fc40
2013-09-19 20:37:55 +01:00
Andrzej J.R. Hunt
831f01b739 Move type conversion into template.`
Change-Id: I7b646673eacf2abbac8a2bcfa744f840ff344c84
2013-09-19 20:37:55 +01:00
Andrzej J.R. Hunt
79f1c6e50e Use conversion for Byte/Bool.
These are both non-native to firebird, hence always have to be converted
from whatever data we have.

Change-Id: I6e6843d95ee4f5cf0cd5953251796150f325f800
2013-09-19 20:37:54 +01:00
Andrzej J.R. Hunt
fc118515ee Implement implicit type conversion in ResultSet. (firebird-sdbc)
Change-Id: I9faf9752556b7e0769d3a353e393924f5a1edb63
2013-09-19 20:37:54 +01:00
Andrzej J.R. Hunt
dba4e216c9 Remove null indicator for type checking. (firebird-sdbc)
Change-Id: I3f693f5662f3022323c7ec726c9d7a506ce02185
2013-09-18 21:03:03 +01:00
Andrzej J.R. Hunt
936cce1110 Add some type checking to ResultSet.
This is in preparation for complying with the API by allowing
implicit type conversion.

Change-Id: I5e52fdc2f3562f806d7f9fba5d558ece4bd182ac
2013-09-18 20:57:08 +01:00
Andrzej J.R. Hunt
4216518982 Update implementations of ColumnLocate::findColumn to throw on invalid column.
Change-Id: I7a9354ecd35a70a005c6c50e38d27de9b33332bd
Reviewed-on: https://gerrit.libreoffice.org/5922
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
2013-09-12 17:26:12 +00: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