|
|
|
|
|
_build_header_fields(self)
constructs fieldblock for disk table |
source code
|
|
|
_check_memo_integrity(self)
checks memo file for problems |
source code
|
|
|
_initialize_fields(self)
builds the FieldList of names, types, and descriptions from the disk
file |
source code
|
|
|
_field_layout(self,
i)
Returns field information Name Type(Length[, Decimals]) |
source code
|
|
|
_list_fields(self,
specs,
sep=',')
standardizes field specs |
source code
|
|
|
|
|
_update_disk(self,
headeronly=False)
synchronizes the disk file with current data |
source code
|
|
|
__contains__(self,
data)
data can be a record, template, dict, or tuple |
source code
|
|
|
|
|
|
|
|
|
|
|
__init__(self,
filename,
field_specs=None,
memo_size=128,
ignore_memos=False,
codepage=None,
default_data_types=None,
field_data_types=None,
dbf_type=None,
on_disk=True)
open/create dbf file filename should include path if needed
field_specs can be either a ;-delimited string or a list of strings
memo_size is always 512 for db3 memos ignore_memos is useful if the
memo file is missing or corrupt read_only will load records into
memory, then close the disk file keep_memos will also load any memo
fields into memory meta_only will ignore all records, keeping only
basic table information codepage will override whatever is set in the
table itself |
source code
|
|
|
__iter__(self)
iterates over the table's records |
source code
|
|
|
__len__(self)
returns number of records in table |
source code
|
|
a new object with type S, a subtype of T
|
__new__(cls,
filename,
field_specs=None,
memo_size=128,
ignore_memos=False,
codepage=None,
default_data_types=None,
field_data_types=None,
dbf_type=None,
on_disk=True) |
source code
|
|
|
__bool__(self)
True if table has any records |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add_fields(self,
field_specs)
adds field(s) to the table layout; format is Name
Type(Length,Decimals)[; Name Type(Length,Decimals)[...]] backup table
is created with _backup appended to name then zaps table, recreates
current structure, and copies records back from the backup |
source code
|
|
|
allow_nulls(self,
fields)
set fields to allow null values |
source code
|
|
|
append(self,
data=b'',
drop=False,
multiple=1)
adds <multiple> blank records, and fills fields with dict/tuple
values if present |
source code
|
|
|
close(self)
closes disk files, flushing record data to disk ensures table data is
available if keep_table ensures memo data is available if keep_memos |
source code
|
|
|
create_backup(self,
new_name=None,
on_disk=None)
creates a backup table |
source code
|
|
|
create_index(self,
key)
creates an in-memory index using the function key |
source code
|
|
|
create_template(self,
record=None,
defaults=None)
returns a record template that can be used like a record |
source code
|
|
|
delete_fields(self,
doomed)
removes field(s) from the table creates backup files with _backup
appended to the file name, then modifies current structure |
source code
|
|
|
disallow_nulls(self,
fields)
set fields to not allow null values |
source code
|
|
|
field_info(self,
field)
returns (field type, size, dec, class) of field |
source code
|
|
|
index(self,
record,
start=None,
stop=None)
returns the index of record between start and stop start and stop
default to the first and last record |
source code
|
|
|
new(self,
filename,
field_specs=None,
memo_size=None,
ignore_memos=None,
codepage=None,
default_data_types=None,
field_data_types=None,
on_disk=True)
returns a new table of the same type |
source code
|
|
|
nullable_field(self,
field)
returns True if field allows Nulls |
source code
|
|
|
open(self,
mode=READ_WRITE)
(re)opens disk table, (re)initializes data structures |
source code
|
|
|
pack(self)
physically removes all deleted records |
source code
|
|
|
query(self,
criteria)
criteria is a string that will be converted into a function that
returns a List of all matching records |
source code
|
|
|
reindex(self)
reprocess all indices for this table |
source code
|
|
|
rename_field(self,
oldname,
newname)
renames an existing field |
source code
|
|
|
resize_field(self,
chosen,
new_size)
resizes field (C only at this time) creates backup file, then
modifies current structure |
source code
|
|
|
structure(self,
fields=None)
return field specification list suitable for creating same table
layout fields should be a list of fields or None for all fields in
table |
source code
|
|
|
zap(self)
removes all records from table -- this cannot be undone! |
source code
|
|
Inherited from _Navigation :
bof ,
bottom ,
current ,
current_record ,
eof ,
first_record ,
goto ,
last_record ,
next_record ,
prev_record ,
skip ,
top
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|