Skip to content

Commit

Permalink
Get semi working implementation of Create done.
Browse files Browse the repository at this point in the history
Still needs tests and some better segmented handling
  • Loading branch information
paladine committed Sep 29, 2024
1 parent d76e2ee commit da3e006
Show file tree
Hide file tree
Showing 3 changed files with 271 additions and 178 deletions.
2 changes: 1 addition & 1 deletion btrieve/BindableValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BindableValue {
}

BindableValue(const char *str, size_t nChars) {
if (str == nullptr) {
if (str == nullptr || !*str) {
type = Type::Null;
} else {
type = Type::Text;
Expand Down
88 changes: 45 additions & 43 deletions btrieve/ErrorCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,50 @@
#define __ERROR_CODES_H_

namespace btrieve {
enum BtrieveError {
Success = 0,
InvalidOperation = 1,
IOError = 2,
FileNotOpen = 3,
KeyValueNotFound = 4,
DuplicateKeyValue = 5,
InvalidKeyNumber = 6,
DifferentKeyNumber = 7,
InvalidPositioning = 8,
EndOfFile = 9,
NonModifiableKeyValue = 10,
InvalidFileName = 11,
FileNotFound = 12,
ExtendedFileError = 13,
PreImageOpenError = 14,
PreImageIOError = 15,
ExpansionError = 16,
CloseError = 17,
DiskFull = 18,
UnrecoverableError = 19,
RecordManagerInactive = 20,
KeyBufferTooShort = 21,
DataBufferLengthOverrun = 22,
PositionBlockLength = 23,
PageSizeError = 24,
CreateIOError = 25,
InvalidNumberOfKeys = 26,
InvalidKeyPosition = 27,
BadRecordLength = 28,
BadKeyLength = 29,
NotBtrieveFile = 30,
TransactionIsActive = 37,
/* Btrieve version 5.x returns this status code
if you attempt to perform a Step, Update, or Delete operation on a
key-only file or a Get operation on a data only file */
OperationNotAllowed = 41,
InvalidRecordAddress = 43,
InvalidKeyPath = 44,
AccessDenied = 46,
InvalidInterface = 53,
enum BtrieveError {
Success = 0,
InvalidOperation = 1,
IOError = 2,
FileNotOpen = 3,
KeyValueNotFound = 4,
DuplicateKeyValue = 5,
InvalidKeyNumber = 6,
DifferentKeyNumber = 7,
InvalidPositioning = 8,
EndOfFile = 9,
NonModifiableKeyValue = 10,
InvalidFileName = 11,
FileNotFound = 12,
ExtendedFileError = 13,
PreImageOpenError = 14,
PreImageIOError = 15,
ExpansionError = 16,
CloseError = 17,
DiskFull = 18,
UnrecoverableError = 19,
RecordManagerInactive = 20,
KeyBufferTooShort = 21,
DataBufferLengthOverrun = 22,
PositionBlockLength = 23,
PageSizeError = 24,
CreateIOError = 25,
InvalidNumberOfKeys = 26,
InvalidKeyPosition = 27,
BadRecordLength = 28,
BadKeyLength = 29,
NotBtrieveFile = 30,
TransactionIsActive = 37,
/* Btrieve version 5.x returns this status code
if you attempt to perform a Step, Update, or Delete operation on a
key-only file or a Get operation on a data only file */
OperationNotAllowed = 41,
InvalidRecordAddress = 43,
InvalidKeyPath = 44,
AccessDenied = 46,
InvalidACS = 48,
InvalidInterface = 53,
FileAlreadyExists = 59,
};
} // namespace btrieve
} // namespace btrieve

#endif
#endif
Loading

0 comments on commit da3e006

Please sign in to comment.