You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each buddy instance will have various functions to get, set, or update values.
This table summarizes the functions available
chado table:
db
dbxref
cv
cvterm
# arrays
lookup
getDb()
getDbxref()
getCv()
getCvterm()
1
insert
insertDb()
insertDbxref()
insertCv()
insertCvterm()
1
update
updateDb()
updateDbxref()
updateCv()
updateCvterm()
2
upsert
upsertDb()
upsertDbxref()
upsertCv()
upsertCvterm()
1
associate
-
associateDbxref()
-
associateCvterm()
na
For update functions, there are two arrays, the first contains the new values, the second contains the query values (conditions)
The array values for the db functions can contain the following keys. These directly correspond to columns in the chado.db table. db_name must be used as an alias for name to prevent ambiguity for cv functions.
table
table column
required for insert
db
db_id
no
db
name (db_name)*
yes
db
description (db_description)*
no
db
urlprefix
no
db
url
no
The array values for the dbxref functions can contain the following keys. These directly correspond to columns in either the chado.dbxref or chado.db tables. Asterisk notes when key differs from column name to prevent ambiguity. db_name must be used as an alias for name to prevent ambiguity for cv functions.
table
table column
required for insert
dbxref
dbxref_id
only used for query
dbxref
accession
yes
dbxref
version
no
dbxref
description (dbxref_description)*
no
db
db_id
yes, but either db_id or name or db_name required
db
name (db_name)*
see above
db
description (db_description)*
no
db
urlprefix
no
db
url
no
The array values for the cv functions can contain the following keys. These directly correspond to columns in the chado.cv table. Asterisk notes when key differs from column name to prevent ambiguity. cv_name must be used as an alias for name to prevent ambiguity for db functions.
table
table column
required for insert
cv
cv_id
no
cv
name (cv_name)*
yes
cv
urlprefix
no
cv
url
no
The array values for the cvterm functions can contain the following keys. These directly correspond to columns in either the chado.cvterm, chado.cv, chado.dbxref, or chado.db tables. Asterisk notes when key differs from column name to prevent ambiguity. db_name must be used as an alias for name to prevent ambiguity for db functions.
table
table column
required for insert
cvterm
cvterm_id
only used for query
cvterm
cv_id
yes but can instead use cv_name
cvterm
dbxref_id
yes but can instead use accession + (db_id or db_name)
cvterm
name (cvterm_name)*
yes
cvterm
definition (cvterm_definition)*
no
cvterm
is_obsolete
no
cvterm
is_relationshiptype
no
cv
cv_id
no
cv
name (cv_name)*
yes
cv
definition (cv_definition)*
no
dbxref
dbxref_id
only if using an existing dbxref
dbxref
accession
yes but can instead use existing dbxref_id
dbxref
version
no
dbxref
description (dbxref_description)*
no
db
db_id
yes, but either db_id or name or db_name required, and only if adding a new dbxref
db
name (db_name)*
see above
db
description (db_description)*
no
db
urlprefix
no
db
url
no
The text was updated successfully, but these errors were encountered:
This is a place for notes and about Chado Buddies for use in developing documentation from PR tripal/tripal#1844
Branch:
89-chado-buddy
One of the simplest cases is working with the chado
db
table. Thedb
anddbxref
tables are handled by theChadoDbxrefBuddy
classTo use it, you will first get a connection to the Buddy service
$buddy_service = \Drupal::service('tripal_chado.chado_buddy');
Then you create an instance of whatever buddy you want to use, for example:
$buddy_instance = $buddy_service->createInstance('chado_dbxref_buddy', []);
Each buddy instance will have various functions to get, set, or update values.
This table summarizes the functions available
For update functions, there are two arrays, the first contains the new values, the second contains the query values (conditions)
The array values for the
db
functions can contain the following keys. These directly correspond to columns in thechado.db
table.db_name
must be used as an alias forname
to prevent ambiguity for cv functions.The array values for the
dbxref
functions can contain the following keys. These directly correspond to columns in either thechado.dbxref
orchado.db
tables. Asterisk notes when key differs from column name to prevent ambiguity.db_name
must be used as an alias forname
to prevent ambiguity for cv functions.The array values for the
cv
functions can contain the following keys. These directly correspond to columns in thechado.cv
table. Asterisk notes when key differs from column name to prevent ambiguity.cv_name
must be used as an alias forname
to prevent ambiguity for db functions.The array values for the
cvterm
functions can contain the following keys. These directly correspond to columns in either thechado.cvterm
,chado.cv
,chado.dbxref
, orchado.db
tables. Asterisk notes when key differs from column name to prevent ambiguity.db_name
must be used as an alias forname
to prevent ambiguity for db functions.The text was updated successfully, but these errors were encountered: