- Comments
- D
- Search
- Home

Last update Sun Jul 22 16:19:28 2007

# std.openrj

Open-RJ mapping for the D standard library.
Authors:
Matthew Wilson
References:
Open-RJ

enum ORJ_FLAG;
  Flags that moderate the creation of Databases
  ORDER_FIELDS
    Arranges the fields in alphabetical order
  ELIDE_BLANK_RECORDS
    Causes blank records to be ignored
const(char)[] toString(ORJ_FLAG f);
enum ORJRC;
  General error codes
  SUCCESS
    Operation was successful
  CANNOT_OPEN_JAR_FILE
    The given file does not exist, or cannot be accessed
  NO_RECORDS
    The database file contained no records
  OUT_OF_MEMORY
    The API suffered memory exhaustion
  BAD_FILE_READ
    A read operation failed
  PARSE_ERROR
    Parsing of the database file failed due to a syntax error
  INVALID_INDEX
    An invalid index was specified
  UNEXPECTED
    An unexpected condition was encountered
  INVALID_CONTENT
    The database file contained invalid content
const(char)[] toString(ORJRC f);
enum ORJ_PARSE_ERROR;
  Parsing error codes
  SUCCESS
    Parsing was successful
  RECORD_SEPARATOR_IN_CONTINUATION
    A record separator was encountered during a content line continuation
  UNFINISHED_LINE
    The last line in the database was not terminated by a line-feed
  UNFINISHED_FIELD
    The last field in the database file was not terminated by a record separator
  UNFINISHED_RECORD
    The last record in the database file was not terminated by a record separator
const(char)[] toString(ORJ_PARSE_ERROR f);
class OpenRJException: object.Exception;
class DatabaseException: std.openrj.OpenRJException;
  ORJRC rc();
  ORJ_PARSE_ERROR parseError();
  int lineNum();
class InvalidKeyException: std.openrj.OpenRJException;
class InvalidTypeException: std.openrj.OpenRJException;
class Field;
  Represents a field in the database
  final const(char)[] name();
  final const(char)[] value();
  Record record();
class Record;
  Represents a record in the database, consisting of a set of fields
  uint numFields();
  uint length();
  Field[] fields();
  Field opIndex(uint index);
  const(char)[] opIndex(const(char)[] fieldName);
  Field getField(const(char)[] fieldName);
  Field findField(const(char)[] fieldName);
  int hasField(const(char)[] fieldName);
  Database database();
  int opApply(int delegate(ref Field field) dg);
  int opApply(int delegate(const char[] name, const char[] value) dg);
class Database;
  this(const(char)[] memory, uint flags);
  this(const(char)[][] lines, uint flags);
  uint numRecords();
  uint numFields();
  uint numLines();
  uint flags();
  Record[] records();
  Field[] fields();
  uint length();
  Record opIndex(uint index);
  Record[] getRecordsContainingField(const(char)[] fieldName);
  Record[] getRecordsContainingField(const(char)[] fieldName, const(char)[] fieldValue);
  int opApply(int delegate(ref Record record) dg);
  int opApply(int delegate(ref Field field) dg);

Copyright © 1999-2007 by Digital Mars, All Rights Reserved | Page generated by Ddoc.