<commit_before>For Tenacity to interact with an ORM, the ORM needs to be extended to support
the methods listed below.  Beyond that, no additional configuration or code is
necessary.  Tenacity communicates with the ORM using these methods only, so
as long as they have been implemented and are available on the model object,
Tenacity will be able to manage the object's relationships.


== A note about IDs

An ID can be an integer, a string, or an object, depending on the database
and ORM you are using.  To be as compatible as possible, Tenacity treats
all IDs as strings.  So, all ORM extensions should accept strings for IDs
as input parameters, and return strings for IDs.


== The Association Class

A few of the methods take an association as a parameter.  This association
is an instance of the Tenacity::Association class, which can be found at
lib/tenacity/association.rb.


== Class Methods

  _t_find(id)

Find an object by its id, and return it.  If the object cannot be found,
return nil.

  _t_find_bulk(ids=[])

Find many objects by the specified ids, and return them in an array.
If no objects could be found, return an empty array.

  _t_find_first_by_associate(property, id)

Find the first object by the specified property name, with the specified id,
and return it.  If no object could be found, return nil.

  _t_find_all_by_associate(property, id)

Find all objects by the specified property name, with the specified id, and
return them in an array.  If no objects could be found, return an empty array.

  _t_initialize_has_many_association(association)

Perform any ORM specific initialization necessary to support a has many
association.  This could include defining properties, or callback methods,
on the object.  This method is optional, and does not need to be defined.

  _t_initialize_belongs_to_association(association)

Perform any ORM specific initialization necessary to support a belongs to
association.  This could include defining properties, or callback methods,
on the object.  This method is optional, and does not need to be defined.

  _t_initialize_has_one_association(association)

Perform any ORM specific initialization necessary to support a has one
association.  This could include defining properties, or callback methods,
on the object.  This method is optional, and does not need to be defined.


== Instance Methods

  _t_reload

Reload the object from the database, overwriting the objects properties with
the data fetched from the database.  Return nothing.

  _t_associate_many(association, associate_ids)

Create has_many associations between this object and the objects with ids
specified in the array of associate_ids.  This method could involve writing
the associate_ids into a join table, or into an object's hash.

  _t_get_associate_ids(association)

Get the ids of the objects associated with this object through the specified
association, and return them in an array.

  _t_clear_associates(association)

Destroy the association between this object and its current associates through
the specified association.  Return nothing.
<commit_msg>Some minor updates to the EXTEND documentation<commit_after>For Tenacity to interact with an ORM, the ORM needs to be extended to support
the methods listed below.  Beyond that, no additional configuration or code is
necessary.  Tenacity communicates with the ORM using these methods only, so
as long as they have been implemented and are available on the model object,
Tenacity will be able to manage the object's relationships.


== A note about IDs

An ID can be an integer, a string, or an object, depending on the database
and ORM you are using.  To be as compatible as possible, Tenacity treats
all IDs as strings.  So, all ORM extensions should accept strings for IDs
as input parameters, and return strings for IDs.


== The Association Class

A few of the methods take an association as a parameter.  This association
is an instance of the Tenacity::Association class, which can be found at
lib/tenacity/association.rb.


== Class Methods

  _t_find(id)

Find an object by its id, and return it.  If the object cannot be found,
return nil.

  _t_find_bulk(ids=[])

Find many objects by the specified ids, and return them in an array.
If no objects could be found, return an empty array.

  _t_find_first_by_associate(property, id)

Find the first object by the specified property name, with the specified id,
and return it.  If no object could be found, return nil.

  _t_find_all_by_associate(property, id)

Find all objects by the specified property name, with the specified id, and
return them in an array.  If no objects could be found, return an empty array.

  _t_initialize_has_many_association(association)

Perform any ORM specific initialization necessary to support a has many
association.  This could include defining properties, or callback methods,
on the object.  This method is optional, and does not need to be defined.

  _t_initialize_belongs_to_association(association)

Perform any ORM specific initialization necessary to support a belongs to
association.  This could include defining properties, or callback methods,
on the object.  This method is optional, and does not need to be defined.

  _t_initialize_has_one_association(association)

Perform any ORM specific initialization necessary to support a has one
association.  This could include defining properties, or callback methods,
on the object.  This method is optional, and does not need to be defined.


== Instance Methods

  _t_reload

Reload the object from the database, overwriting the objects properties with
the data fetched from the database.  Return nothing.

  _t_associate_many(association, associate_ids)

Create has_many associations between this object and the objects with ids
specified in the array of associate_ids.  This method could involve writing
the associate_ids into a join table, or into one of the object's properties.
Return nothing.

  _t_get_associate_ids(association)

Get the ids of the objects associated with this object through the specified
association, and return them in an array.  Return an empty array if there
are no associated objects.

  _t_clear_associates(association)

Destroy the association between this object and its current associates through
the specified association.  Return nothing.

{'fraction_non_alphanumeric': 0.034722222222222224, 'fraction_numerical': 0.0, 'mean_word_length': 4.607964601769911, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3768130', 'n_tokens_mistral': 1650, 'n_tokens_neox': 1599, 'n_words': 908}