Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    drexel-ue
    @drexel-ue
    trying to grab all of the rows of the _Video table that belong to a certain user. getting the following error:
    https://gist.github.com/drexel-ue/df1c37ff153905b291fcf8775ca23b38
    drexel-ue
    @drexel-ue

    trying to conceptualize this. id like to display in my app a list of social alerts, things like 'this user liked this user', 'this user shared this video'. all of this pertaining to one user. I have has many relationships in the database for likes and shares. im running joins. im wondering how to sort the returned likes and shares by a column they have in common 'createdAt'. or if there is just a better way to go about this altogether. as i understand it the object returned would look like:

      "id": 1,
      "name": "Bob",
      "likes": [
          {"id": 1, "contents": "Take out trash", "user" : {"id": 1}},
          ...
      ],
     "shares": [
          {"id": 1, "contents": "Take out trash", "user" : {"id": 1}},
          ...
      ]
    }

    what stumps me is how to order something like that

    István Soós
    @isoos
    @drexel-ue Usually these are stored as separate rows (or documents if you are using a document-based DB), and you query that with an index.
    drexel-ue
    @drexel-ue
    im using aqueduct, with says to avoid raw sql....so i can pull all likes, shares related to a user, but then i'd like to sort them by date.....this im unsure of
    István Soós
    @isoos
    I've published postgres 2.0.0-dev1.0. Please give it a try and let me know if you see any bugs with it.
    Göran Krampe
    @gokr
    @drexel-ue I guess you figured out the blank migration thing? IIRC you need to reach the controllers from your channel.dart
    Personally I am wondering about the class X = Y with Z syntax - is it sugar for extends? I can't find it in lang tour etc
    Ravi Teja Gudapati
    @tejainece
    My app does not exit probably because some (leaked) async task is still running. Is there a way to find using observatory (or anyother method) to debug this leak?
    István Soós
    @isoos
    I usually disable parts of the app and debug it that way, would be interesting if observatory could identify it though. Maybe the top-down object graph?
    Nate Bosch
    @natebosch
    Usually when there is something holding the VM open I focus on things relating to IO
    is there some socket listener? stdin listener? signal listener?
    It can be tricky tracking it down
    Joe Conway
    @joeconwaystk
    the ‘Ports’ section in observatory can at least tell you how many/what kind, but can’t tell you where they were opened
    mockturtl
    @mockturtl
    announcement! I wrote a utility to simplify adding dependencies. syntax is dab dep mypackage inserts mypackage: ^x.y.z in your pubspec. let me know if you find it useful!
    https://pub.dev/packages/dab
    Adib Mohsin
    @pacifio
    I wrote a package for printing out emojis
    not much helpful but you might wanna check it out
    https://github.com/pacifio/demoji
    Ravi Teja Gudapati
    @tejainece
    @pacifio here is an emoji for you 👍
    @mockturtl it would be nice if intellij provides suggestions when you ctrl+space in pubspec.yaml file for packages in pub.dev
    mockturtl
    @mockturtl
    @tejainece definitely -- upvote flutter/flutter-intellij#2313
    ShirajSharma
    @ShirajSharma
    guys i am about to do a quick study on dart beckend stuff could you tell me what should i start with i know about flutter frontend UI and have sound knowledge but i don't know about backend in dart what should i see at first??
    Tobe Osakwe
    @thosakwe
    Adib Mohsin
    @pacifio
    guys check out my validation library for dart
    https://github.com/pacifio/validated
    drexel-ue
    @drexel-ue
    hi all. im running an update query in my postgres database and nothing is happening, event though no errors are thrown and postgres says the update occurred. would anyone know whats going on, have an idea, or know what to google? (posted in flutter/flutter as well)
    trivia_black=> select fists from _user where id = 95;
     fists 
    -------
         0
    (1 row)
    trivia_black=> update _user set fists = 1 where id = 95;
    UPDATE 1
    trivia_black=> select fists from _user where id = 95;
     fists 
    -------
         0
    (1 row)
    drexel-ue
    @drexel-ue

    hi all. im running an update query in my postgres database and nothing is happening, event though no errors are thrown and postgres says the update occurred. would anyone know whats going on, have an idea, or know what to google? (posted in flutter/flutter as well)

    trivia_black=> select fists from _user where id = 95;
     fists 
    -------
         0
    (1 row)
    trivia_black=> update _user set fists = 1 where id = 95;
    UPDATE 1
    trivia_black=> select fists from _user where id = 95;
     fists 
    -------
         0
    (1 row)

    RESOLVED: an update trigger was resetting the value

    István Soós
    @isoos

    an update trigger was resetting the value

    O...o

    Matheus Moreira
    @Militao36
    Server Dart, does it have a future?
    István Soós
    @isoos
    It already has a present :) what are you looking for to do?
    Matheus Moreira
    @Militao36
    One API :)
    István Soós
    @isoos
    not sure what you mean by that?
    Matheus Moreira
    @Militao36
    I want to make an API, for real time, and I want to use Isolates too if I have some things that require processing
    István Soós
    @isoos
    Well, you can do that for sure. There are a few isolate-helper libraries, and for the real time thing you could use web sockets.
    Adib Mohsin
    @pacifio
    how can I list directory content in dart
    is there any package or something like that ?
    István Soós
    @isoos
    @pacifio it is in the Dart SDK: list and listSync
    Adib Mohsin
    @pacifio
    I know that nodejs has "npm check updates" ....
    I want to know if something exists for dart which gives me a list of outdated packages ...
    István Soós
    @isoos
    pub upgrade --dry-run
    Adib Mohsin
    @pacifio
    @isoos thanks bruv
    Adib Mohsin
    @pacifio
    if you wanna predict estimated time for reading like one medium uses .. I made a library -> https://github.com/pacifio/reading_time
    this is a rather small library but it might be useful for you guys
    if you like it , star it 😁
    István Soós
    @isoos
    @pacifio: instead of a Map why not return a typed object with proper fields?
    it can have a toJson() method that creates the map
    Adib Mohsin
    @pacifio
    I will look into it :)
    I will create a class in the next version :)
    Adib Mohsin
    @pacifio
    I want to call stdout.flush but it throws an error
    I can't find solid solution ...
    it says : Bad state: StreamSink is bound to a stream
    István Soós
    @isoos
    @pacifio How do you emit the data to stdout?
    https://api.dartlang.org/stable/2.4.1/dart-io/Stdout/flush.html
    "This method must not be called while an addStream is incomplete."
    István Soós
    @isoos
    Does anybody use a "standard" API generator (Swagger, OpenAPI, anything else)?
    Joe Conway
    @joeconwaystk
    @isoos I’ve used this one: https://github.com/OpenAPITools/openapi-generator but not since dart 1, and it was OK for getting started, but not the API I’d want to keep
    Adib Mohsin
    @pacifio
    I made an extremely small library for emitting and reacting to a certain event , it can even transmit dynamic data . Every event is parsed by an unique identifier which must be a string . It's built on top of dart streams , check it out here :)
    github : https://github.com/pacifio/neurone
    pub : https://pub.dev/packages/neurone
    István Soós
    @isoos
    @pacifio: is there a use case which you recommend using it for? (I imagine that you had a pain point for choosing such design...)
    Adib Mohsin
    @pacifio
    yup definitely
    while I was working on a dart cli project .... I had to emit some signals that would log down some info ...
    I couldn
    *I couldn't ..
    So I made this
    other libraries were ( too much )
    that's why bro