Questions tagged [aqueduct]

Aqueduct is an open-source, server-side framework written in Google’s Dart language.

Major Features


  1. HTTP Request Routing.
  2. Multiple CPU support, without adding complicated multi-threading logic.
  3. CORS Support.
  4. Automatic OpenAPI specification/documentation generation.
  5. OAuth 2.0 implementation.
  6. Fully-featured ORM, with clear, type- and name-safe syntax, and SQL 6. Join support. (Supports PostgreSQL by default.)
  7. Database migration tooling.
  8. Template projects for quick starts.
  9. Integration with CI tools. (Supports TravisCI by default.)
  10. Integrated testing utilities for clean and productive tests.
  11. Logging

Tutorials


Need a walkthrough? Read the tutorials. They take you through the steps of building an Aqueduct application.

Documentation


You can find the API reference here. You can find in-depth guides and tutorials here.

139 questions
1
vote
0 answers

Axios fetch token from dart's aqueduct

Using javascript axios am trying to fetch a token from dart's aqueduct. https://aqueduct.io/docs/auth/controllers/ aqueduct uses oauth2 specification on the backend, and it has sample code for fetching on dart. Dart code is working: var clientID =…
7skies
  • 167
  • 4
  • 17
1
vote
1 answer

Change naming strategy in Aqueduct ORM

Is it possible to setup Aqueduct ORM to use underscored names for database columns (so if I have field "someField" in model class it will be stored as "some_field" in the database)? Or may be it is at least possible to override column name by some…
kiv_apple
  • 491
  • 3
  • 13
1
vote
1 answer

Creating a middleware controller to handle all requests to Aqueduct in Dart

I want to make a logger that will log certain information from every request to the database. I know how to make a controller and I could link it to every route like this: @override Controller get entryPoint { final router = Router(); …
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
1
vote
1 answer

How to get the IP address of a client request in an Aqueduct Dart server

I'm making an Aqueduct server. I'd like to know the IP address of the client request for monitoring logs and for providing general location based content. In Aqueduct I don't see how to get the IP address. I was going to say that I tried X, Y, and…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
1
vote
0 answers

Table and column naming convention Postgres Dart-Aqueduct

I'm having a conflict in defining the way we name tables and columns. I'm using Postgres and Aqueduct framework in Dart. As I know Postgres doesn't like capitals. So the preferred method is for example changed_by. Dart prefers lowerCamelCase, for…
Adri
  • 23
  • 4
1
vote
1 answer

How to have different table name in Aqueduct and in Postgres

I want to use table names in Postgres like "TableName". In Aqueduct the suggested class name is _tablename. As I read the manual I can use @Table(name: "TableName") but that doesn't seem to work (or probably not understood correctly). Is there a…
Adri
  • 23
  • 4
1
vote
1 answer

Send post request in aqueduct dart

I have created a post request in aqueduct dart and it takes json as body parameter, and I need to send that request body to thirdparty api , upon getting response from third party api I need to return that response to user. I have updated the code…
focode
  • 648
  • 1
  • 16
  • 39
1
vote
1 answer

auqeduct How to get the length of a property as a transient property?

in my model a Author has many Books. Is it possible to get the amount of books per author a transient property? This is what I tried but it says: NoSuchMethodError: The getter 'length' was called on null. My inspiration came from the docs. class…
1
vote
0 answers

How to make an nested Query or just look up if an foreign key exists in Aqueduct dart

I was trying this for 5 hours and i could'n find an solution for this. I want an nested query, for an many to many relationship. If I go with my User, Books, userBooksLikes example again. (For better understanding: I want to track in the…
CKWDani
  • 33
  • 7
1
vote
0 answers

Dart Aqueduct generating flat joints

I'm working with the aqueduct dart framework and encountering some problems. As aqueduct does not have such an big community its pretty difficult to google porblems. If I have 3 Tables for example: User, Books, userBooksLikes. And I want to track…
CKWDani
  • 33
  • 7
1
vote
1 answer

How to make Dart/Aqueduct run permanently

I'm new in Dart lang, also new in API services on linux. My question is, how to I keep the Dart service active in linux? And how can I do it to recycle if I have a problem with the service? I need to run in crontab?
1
vote
0 answers

Getting an error testing Heroes tutorial code

I'm working through the generic Heroes tutorial, and have come to the section on testing. I run the basic included test and it throws an error [SEVERE] aqueduct: type 'String' is not a subtype of type 'Map' in type cast Instance of…
Old Brian
  • 73
  • 3
1
vote
0 answers

Simple join in Aqueduct

I'm newbie in a backend development and stuck with a simple request and ask for help. I am trying to get a simple join: select * from product a, product_barcode b where a.productid = b.productid Structure of the classes: Product class Product…
Timur
  • 111
  • 1
  • 11
1
vote
1 answer

What is the most lightweight way to get last modified datetime from an Aqueduct application?

I'm writing a very small REST API using Dart/Aqueduct hosted on Heroku utilizing PostgreSQL. When communicating with this API, I need to fetch all data and store it in an application locally. The application will on reboot ask the API if any data…
zniwalla
  • 367
  • 4
  • 17
1
vote
1 answer

Is it possible to modify the properties that are returned for the joined objects that have WHERE clause?

I have been trying to change the returned properties of a joined object, considering that it has a filter from a WHERE clause. However this was not possible directly because the WHERE clause returns a QueryExpression class and not the Query class…