7 Commits

Author SHA1 Message Date
Christoph Michael Becker 2fd81dcf64 Merged revision(s) 340848-340851 from pecl/dbase/branches/dbase-5.1
git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@340852 c90b9560-bf6c-de11-be94-00142212c4b1
2016-11-03 14:52:38 +00:00
Christoph Michael Becker 532db6076b Add float field ('F') to example.dbf and adjust tests accordingly
git-svn-id: http://svn.php.net/repository/pecl/dbase/branches/dbase-5.1@340850 c90b9560-bf6c-de11-be94-00142212c4b1
2016-11-03 13:57:52 +00:00
Christoph Michael Becker ec3bb1d6e1 Add support for datetime fields
We add support for FoxPro datetime fields, which store an exact
timestamp in two binary dwords, representing the Julian day number and
the number of milliseconds since midnight, respectively. These are
represented in userland as strings with the format "YYYYMMDDhhmmss.uuu",
which conforms to ISO-8601.

According to the current handling of date fields, the validity of input
and output is not checked, i.e. it is possible to store invalid datetime
values in the database. If necessary, respective checks have to be made
by the programmer.

To avoid reinventing the wheel, but also not to rely on ext/calendar, we
add the respective functionality and adapt the names to avoid build
conflicts.

git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@340796 c90b9560-bf6c-de11-be94-00142212c4b1
2016-10-30 12:14:01 +00:00
Christoph Michael Becker b182a51783 Make relevant open mode constants available to userland
The open mode values might be implementation-dependend, so we make
DBASE_RDONLY and DBASE_RDWR available to userland.

git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@340746 c90b9560-bf6c-de11-be94-00142212c4b1
2016-10-28 00:46:02 +00:00
Christoph Michael Becker 9d68eb7a6f Use proper resources instead of integer identifiers
The database handles should be really opaque to userland, and not only
treated as such, to avoid confusion and bugs. This appears to be
particularly relevant as of PHP 7.0.0 which introduces `int` type hints.

We consider the BC break to be relatively small; quite likely only some
tests would be affected (as can be seen in our test suite). And, anyhow,
we're working on a new major version, so at least some BC breaks are to
be expected.

Objects would be an alternative, but without methods they won't be a
real improvement over resources, so we leave that for a future version.

git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@340743 c90b9560-bf6c-de11-be94-00142212c4b1
2016-10-27 17:52:02 +00:00
Christoph Michael Becker 1cab294598 Backport test suite improvements from trunk
git-svn-id: http://svn.php.net/repository/pecl/dbase/branches/dbase-5.1@339844 c90b9560-bf6c-de11-be94-00142212c4b1
2016-08-11 09:50:13 +00:00
Christoph Michael Becker 1bc60571cc Add some test cases
git-svn-id: http://svn.php.net/repository/pecl/dbase/trunk@339808 c90b9560-bf6c-de11-be94-00142212c4b1
2016-08-06 11:32:08 +00:00