<commit_before>Database-Server Behavior
------------------------
**Authors**  
Kevin "Kestred" Stenerson (09-04-2013)


### Section 0: Abstract ###

This section documents the messages involved in interacting with a Database
Server. A Database Server is a component with a single, preconfigured channel.
This channel is used to request the Database Server to:
 - Create new objects stored in the database.
 - Update object fields stored in database.
 - Run queries on objects stored in the database.

When one or more of a database object's values is updated through a set- or delete-
operation, the database will broadcast the recieved message over the database messages
channel (2 << 32|do_id).  This behavior is default, but can be disabled through the daemon config.


### Section 1: Database Server Messages ###
The following is a list of database control messages:

**DBSERVER_CREATE_OBJECT(3000)**  
    `args(uint32 context, uint16 dclass_id, uint16 field_count,
         [uint16 field_id, <VALUE>]*field_count)`  
**DBSERVER_CREATE_OBJECT_RESP(3001)**  
    `args(uint32 context, uint32 do_id)`  
> This message creates a new object in the database with the given fields set to
> the given values.  If a field was not given, but has a default value, the default
> value is stored.
> 
> If creation fails INVALID_DO_ID (0) is returned.
<commit_msg>Typofix: Dbserver protocol.<commit_after>Database-Server Behavior
------------------------
**Authors**  
Kevin "Kestred" Stenerson (09-04-2013)


### Section 0: Abstract ###

This section documents the messages involved in interacting with a Database
Server. A Database Server is a component with a single, preconfigured channel.
This channel is used to request the Database Server to:
 - Create new objects stored in the database.
 - Update object fields stored in database.
 - Run queries on objects stored in the database.

When one or more of a database object's values is updated through a set- or delete-
operation, the database will broadcast the received message over the database messages
channel (2 << 32|do_id).  This behavior is default, but can be disabled through the daemon config.


### Section 1: Database Server Messages ###
The following is a list of database control messages:

**DBSERVER_CREATE_OBJECT(3000)**  
    `args(uint32 context, uint16 dclass_id, uint16 field_count,
         [uint16 field_id, <VALUE>]*field_count)`  
**DBSERVER_CREATE_OBJECT_RESP(3001)**  
    `args(uint32 context, uint32 do_id)`  
> This message creates a new object in the database with the given fields set to
> the given values.  If a field was not given, but has a default value, the default
> value is stored.
> 
> If creation fails INVALID_DO_ID (0) is returned.

{'fraction_non_alphanumeric': 0.08657373440939105, 'fraction_numerical': 0.024944974321349962, 'mean_word_length': 3.958181818181818, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6510195', 'n_tokens_mistral': 772, 'n_tokens_neox': 728, 'n_words': 356}