Skip to content

Commit ce372bd

Browse files
committed
remove getDescribe().getName()
1 parent fc31b46 commit ce372bd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

force-app/main/default/classes/SOQL.cls

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ public inherited sharing class SOQL implements Queryable {
470470
}
471471

472472
public Object toField(SObjectField fieldToExtract) {
473-
return with(fieldToExtract).toObject().get(fieldToExtract.getDescribe().getName());
473+
return with(fieldToExtract).toObject().get(fieldToExtract);
474474
}
475475

476476
public Integer toInteger() {
@@ -643,11 +643,11 @@ public inherited sharing class SOQL implements Queryable {
643643
}
644644

645645
public void count(SObjectField field) {
646-
count('COUNT(' + field.getDescribe().getName() + ')');
646+
count('COUNT(' + field + ')');
647647
}
648648

649649
public void count(SObjectField field, String alias) {
650-
count('COUNT(' + field.getDescribe().getName() + ') ' + alias);
650+
count('COUNT(' + field + ') ' + alias);
651651
}
652652

653653
public void count(String countSoql) {
@@ -677,7 +677,7 @@ public inherited sharing class SOQL implements Queryable {
677677
}
678678

679679
public void with(String relationshipPath, SObjectField field) {
680-
queryFields.add(relationshipPath + '.' + field.getDescribe().getName());
680+
queryFields.add(relationshipPath + '.' + field);
681681
}
682682

683683
public String build() {
@@ -978,7 +978,7 @@ public inherited sharing class SOQL implements Queryable {
978978
}
979979

980980
public Filter with(String relationshipName, SObjectField field) {
981-
return with(relationshipName + '.' + field.getDescribe().getName());
981+
return with(relationshipName + '.' + field);
982982
}
983983

984984
public Filter with(String field) {
@@ -1145,7 +1145,7 @@ public inherited sharing class SOQL implements Queryable {
11451145
}
11461146

11471147
public void rollup(SObjectField field) {
1148-
groupByFields.add('ROLLUP(' + field.getDescribe().getName() + ')');
1148+
groupByFields.add('ROLLUP(' + field + ')');
11491149
}
11501150

11511151
public String build() {
@@ -1185,7 +1185,7 @@ public inherited sharing class SOQL implements Queryable {
11851185
}
11861186

11871187
public QOrderBy with(String relationshipName, SObjectField field) {
1188-
return with(relationshipName + '.' + field.getDescribe().getName());
1188+
return with(relationshipName + '.' + field);
11891189
}
11901190

11911191
public QOrderBy with(String field) {

0 commit comments

Comments
 (0)