Git Product home page Git Product logo

scala-dsh's People

Contributors

freddie-freeloader avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

scala-dsh's Issues

Creation of table scheme

How should the user define tables?

  • annotate classes
    • Doing too much magic behind the scenes confuses IDEs, which reduces usability
  • simple inheritance of something like trait Table[T]

How should a tables' primary key be defined?

  • By a function?
    Draft:
case class Person(id: Int, name: String) extends Table[Person] { self =>
  override val key = List(self.id)
}
  • Warning at compile time, if no key is defined?
    • What implication has this for nested query results?

Create correct types for nodes in AST

Quill's AST has no typed nodes ⚠️

  • Is there any way to deduct types anyway?
    • Yes, but types of table's columns are at least needed ❗
    • Could Quill provide this? → Related Quill issue

THE BIG ADVENTURE IN REFLECTION WORLD

  • typeOf[Person] returns Person as universe.Type
  • decls returns us all Members of that type as List[Symbols]
  • someSymbol.name returns the name and someSymbol.typeSignature the Type 💃
  • to print the Type's name: someType.typeSymbol.name.decodedName.toString

Conclusion

  • get Fields' Name:
typeOf[Foo].decls
.map(_.name.decodedName.toString)
.takeWhile(_!="<init>")
  • get Fields' Type:
typeOf[Foo].decls
.map(_.typeSignature.typeSymbol.name.decodedName.toString)
.takeWhile(_!="<none>")

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.