Skip to content

Commit

Permalink
nit: remove extra underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
dickermoshe committed May 3, 2024
1 parent af8dff7 commit 8ca18b9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drift_dev/lib/src/writer/manager/manager_templates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ part of "database_manager_writer.dart";
///
/// This is used by the [DatabaseManagerWriter] to generate code for the manager classes
class _ManagerCodeTemplates {
_ManagerCodeTemplates(this.__scope);
_ManagerCodeTemplates(this._scope);

/// A Scope class which contains the current scope of the generation
///
/// Used to generating names which require import prefixes
final Scope __scope;
final Scope _scope;

/// Returns the name of the manager class for a table
///
Expand All @@ -27,7 +27,7 @@ class _ManagerCodeTemplates {
///
/// E.g. `i0.GeneratedDatabase` or `AppDatabase`
String databaseType(TextEmitter leaf, String dbClassName) {
return switch (__scope.generationOptions.isModular) {
return switch (_scope.generationOptions.isModular) {
true => leaf.drift("GeneratedDatabase"),
false => dbClassName,
};
Expand Down Expand Up @@ -156,7 +156,7 @@ class _ManagerCodeTemplates {
} else {
companionBuilderBody = StringBuffer('=> $companionClassName.insert(');
}
for (final column in UpdateCompanionWriter(table, __scope).columns) {
for (final column in UpdateCompanionWriter(table, _scope).columns) {
final value = leaf.drift('Value');
final param = column.nameInDart;
final typeName = leaf.dartCode(leaf.dartType(column));
Expand Down Expand Up @@ -211,7 +211,7 @@ class _ManagerCodeTemplates {
/// Code for getting a table from inside a composer
/// handles modular generation correctly
String _referenceTableFromComposer(DriftTable table, TextEmitter leaf) {
if (__scope.generationOptions.isModular) {
if (_scope.generationOptions.isModular) {
final extension = leaf.refUri(
ModularAccessorWriter.modularSupport, 'ReadDatabaseContainer');
final type = leaf.dartCode(leaf.entityInfoType(table));
Expand Down

0 comments on commit 8ca18b9

Please sign in to comment.