DBD-XBase
view release on metacpan or search on metacpan
driver_characteristics view on Meta::CPAN
dbi:XBase:/path/to/directory
It defaults to current directory.
Details of any driver specific attributes applicable to the
connect method.
There are no driver specific attributes for the DBI->connect method.
=head2 Numeric Data Handling
What numeric data types do the database and driver support? (INTEGER,
FLOAT, NUMBER(p,s) etc). What is the maximum scale and precision for
each type?
DBD::XBase supports generic NUMBER(p,s), FLOAT(p,s) and INTEGER(l)
types. Maximul scale and precision unknown, limited by Perl's handling
of numbers. In the dbf files, the numbers are stored as ASCII strings,
or binary integers or floats.
Existing dbf files come with the field types defined in the dbf file
header. Numeric types can be either stored as ASCII string or in some
binary format. DBD::XBase (via XBase.pm) parses this information and reads and
writes the fields in that format.
When you create a I<new> dbf file (via CREATE TABLE), the numeric
fields are always created in the traditional XBase way, as an ASCII
string. (The XBase.pm module offer more control over this.)
Does the database and driver support numbers outside the valid range
for perl numbers?
Are numbers returned as strings in this case?
Numeric fields are always returned as perl numeric values, not strings,
so numbers outside of Perl's valid range are not possible (this
restriction might be withdrawn in the future).
=head2 String Data Handling
What string data types does the database support? (CHAR, VARCHAR, etc)
DBD::XBase knows CHAR(length) and VARCHAR(length), both are stored as
fixed length chars however. These can contain any binary values.
What is the maximum size for each type?
The maximum length is 65535 characters for both types (even if the
older dBase's only allowed 255 characters, so created dbf might not be
portable to other xbase compatible software).
Are any types blank padded? If so which, e.g., CHAR.
Both CHAR and VARCHAR are blank padded (unless ChopBlanks set).
How does the database handle data with the 8th bit set (national
language character sets etc)?
Data with the 8th bit set are handles transparently, no national
language character set conversions are done.
Is Unicode supported?
Since the string types can store binary data, Unicode strings can be
stored.
=head2 Date Data Handling
What date, time and date+time data types are supported
and what is their valid range and resolution?
What is the default output format for each?
What is the default input format for each?
Are multiple input format recognised?
DBD::XBase supports these date and time types:
DATE
DATETIME
TIME
The DATE type holds an eight character string in the format
`YYYYMMDD'. Only that format can be used for input and output.
DBD::XBase doesn't check for validity of the values.
The DATETIME and TIME types store (internally) a 4 byte integer day
value (Julian Day System) and a 4 byte integer seconds value (that
counts 1/1000's of a second since midnight). DBD::XBase inputs and
outputs these types using a floating point unix-style
seconds-since-epoch value (possibly with decimal part and possibly
negative). This might change in the future.
If only part of a date is specified, how does the rest default?
If two digit years can be used, how is the century determined?
N/A
Can the default format be changed? If so, how (both for a single
expression in an sql statement, and as a database connection default)?
No.
How can I get the current date+time in an SQL expression?
There is no way to get the current date/time.
How can I input date and date+time values in other formats?
How can I output date and date+time values in other formats?
N/A
What kinds of date and time arithmetic and functions are supported?
None.
( run in 2.094 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )