<commit_before>import 'dart_todo_server.dart';

class TodoRequestSink extends RequestSink
{
  static String ConfigurationKey = "TodoRequestSink.Configuration";
  ManagedContext context;

  TodoRequestSink(Map<String, dynamic> options) : super(options) {
    var dataModel = new ManagedDataModel.fromCurrentMirrorSystem();

    var config = options[ConfigurationKey];
    var database = config.database;
    var persistentStore = new PostgreSQLPersistentStore.fromConnectionInfo(database.username, 
                                                                           database.password, 
                                                                           database.host, 
                                                                           database.port, 
                                                                           database.databaseName);
    context = new ManagedContext(dataModel, persistentStore);
  }

  @override
  void setupRouter(Router router)
  {
    router
      .route("/todos")
      .generate(() => new TodoController());
  }
}

class TodoConfiguration extends ConfigurationItem
{
  DatabaseConnectionConfiguration database;

  TodoConfiguration(String fileName) : super.fromFile(fileName);
}<commit_msg>add option id http path parameter for other queries<commit_after>import 'dart_todo_server.dart';

class TodoRequestSink extends RequestSink
{
  static String ConfigurationKey = "TodoRequestSink.Configuration";
  ManagedContext context;

  TodoRequestSink(Map<String, dynamic> options) : super(options) {
    var dataModel = new ManagedDataModel.fromCurrentMirrorSystem();

    var config = options[ConfigurationKey];
    var database = config.database;
    var persistentStore = new PostgreSQLPersistentStore.fromConnectionInfo(database.username, 
                                                                           database.password, 
                                                                           database.host, 
                                                                           database.port, 
                                                                           database.databaseName);
    context = new ManagedContext(dataModel, persistentStore);
  }

  @override
  void setupRouter(Router router)
  {
    router
      .route("/todos/[:id]")
      .generate(() => new TodoController());
  }
}

class TodoConfiguration extends ConfigurationItem
{
  DatabaseConnectionConfiguration database;

  TodoConfiguration(String fileName) : super.fromFile(fileName);
}
{'fraction_non_alphanumeric': 0.06985871271585557, 'fraction_numerical': 0.0, 'mean_word_length': 1.788840262582057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4990980', 'n_tokens_mistral': 539, 'n_tokens_neox': 529, 'n_words': 120}