mirror of https://github.com/AMT-Cheif/drift.git
More moor -> drift renaming in `sqlparser`
This commit is contained in:
parent
05abe4de4c
commit
75c0423b42
|
@ -7,7 +7,7 @@ import '../statements/transaction.dart';
|
|||
import '../visitor.dart';
|
||||
import 'drift_file.dart';
|
||||
|
||||
/// A declared statement inside a `.moor` file. It consists of an identifier,
|
||||
/// A declared statement inside a `.drift` file. It consists of an identifier,
|
||||
/// followed by a colon and the query to run.
|
||||
class DeclaredStatement extends Statement implements PartOfDriftFile {
|
||||
final DeclaredStatementIdentifier identifier;
|
||||
|
@ -42,7 +42,7 @@ class DeclaredStatement extends Statement implements PartOfDriftFile {
|
|||
Iterable<AstNode> get childNodes => [statement, ...parameters];
|
||||
}
|
||||
|
||||
/// How a statement was declared in a moor file.
|
||||
/// How a statement was declared in a drift file.
|
||||
///
|
||||
/// We support [SimpleName]s (`name: SELECT * FROM tbl`) and special keywords
|
||||
/// starting with an `@` in
|
||||
|
|
|
@ -4,10 +4,10 @@ import '../visitor.dart';
|
|||
import 'declared_statement.dart';
|
||||
import 'import_statement.dart';
|
||||
|
||||
/// Marker interface for AST nodes that are moor-specific.
|
||||
/// Marker interface for AST nodes that are drift-specific.
|
||||
abstract class DriftSpecificNode implements AstNode {}
|
||||
|
||||
/// Something that can appear as a top-level declaration inside a `.moor` file.
|
||||
/// Something that can appear as a top-level declaration inside a `.drift` file.
|
||||
abstract class PartOfDriftFile implements Statement, DriftSpecificNode {}
|
||||
|
||||
/// A parsed `.drift` file.
|
||||
|
|
|
@ -4,7 +4,7 @@ import '../statements/statement.dart';
|
|||
import '../visitor.dart';
|
||||
import 'drift_file.dart';
|
||||
|
||||
/// An `import "file.dart";` statement that can appear inside a moor file.
|
||||
/// An `import "file.dart";` statement that can appear inside a drift file.
|
||||
class ImportStatement extends Statement implements PartOfDriftFile {
|
||||
Token? importToken;
|
||||
StringLiteralToken? importString;
|
||||
|
|
|
@ -2,18 +2,18 @@ import '../../reader/tokenizer/token.dart';
|
|||
import '../ast.dart';
|
||||
|
||||
/// An inline Dart component that appears in a compiled sql query. Inline Dart
|
||||
/// components can be bound with complex expressions at runtime by using moor's
|
||||
/// components can be bound with complex expressions at runtime by using drift's
|
||||
/// Dart API.
|
||||
///
|
||||
/// At the moment, we support 4 kind of inline components:
|
||||
/// 1. expressions: Any expression can be used for moor: `SELECT * FROM table
|
||||
/// 1. expressions: Any expression can be used for drift: `SELECT * FROM table
|
||||
/// = $expr`. Generated code will write this as an `Expression` class from
|
||||
/// moor.
|
||||
/// 2. limits, which will be exposed as a `Limit` component from moor
|
||||
/// drift.
|
||||
/// 2. limits, which will be exposed as a `Limit` component from drift
|
||||
/// 3. A single order-by clause, which will be exposed as a `OrderingTerm` from
|
||||
/// moor.
|
||||
/// drift.
|
||||
/// 4. A list of order-by clauses, which will be exposed as a `OrderBy` from
|
||||
/// moor.
|
||||
/// drift.
|
||||
abstract class DartPlaceholder extends AstNode implements DriftSpecificNode {
|
||||
final String name;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import 'drift_file.dart';
|
|||
///
|
||||
/// Nested star result columns behave similar to a regular [StarResultColumn]
|
||||
/// when the query is actually run. However, they will affect generated code
|
||||
/// when using moor.
|
||||
/// when using drift.
|
||||
class NestedStarResultColumn extends ResultColumn
|
||||
implements DriftSpecificNode, Renamable {
|
||||
final String tableName;
|
||||
|
|
Loading…
Reference in New Issue