Compare commits
	
		
			No commits in common. "afebaf0ee64ca6c7fd604b83272e60aecb4f65dc" and "85d5e342c1020a3e225cd454f75f60c3660fd508" have entirely different histories.
		
	
	
		
			afebaf0ee6
			...
			85d5e342c1
		
	
		
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,3 +1,3 @@ | ||||
| api2/ | ||||
| **/build/ | ||||
| 
 | ||||
| ./api/build/ | ||||
| out.js | ||||
| @ -1,4 +0,0 @@ | ||||
| { | ||||
|   "version": "4.2.5", | ||||
|   "resolveLibs": "scoped" | ||||
| } | ||||
| @ -1,8 +1,7 @@ | ||||
| -lib tink_http | ||||
| -lib tink_web | ||||
| #-lib tink_hxx | ||||
| -lib tink_hxx | ||||
| -lib tink_json | ||||
| -lib tink_sql | ||||
| -lib hxnodejs | ||||
| -cp src | ||||
| --main Server | ||||
|  | ||||
| @ -1,3 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/http-status#1.3.1" into http-status/1.3.1/haxelib | ||||
| -cp ${HAXE_LIBCACHE}/http-status/1.3.1/haxelib/src | ||||
| -D http-status=1.3.1 | ||||
| @ -1,7 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/hxnodejs#12.1.0" into hxnodejs/12.1.0/haxelib | ||||
| -cp ${HAXE_LIBCACHE}/hxnodejs/12.1.0/haxelib/src | ||||
| -D hxnodejs=12.1.0 | ||||
| --macro allowPackage('sys') | ||||
| # should behave like other target defines and not be defined in macro context | ||||
| --macro define('nodejs') | ||||
| --macro _internal.SuppressDeprecated.run() | ||||
| @ -1,4 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_anon#0.7.0" into tink_anon/0.7.0/haxelib | ||||
| -lib tink_macro | ||||
| -cp ${HAXE_LIBCACHE}/tink_anon/0.7.0/haxelib/src | ||||
| -D tink_anon=0.7.0 | ||||
| @ -1,7 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_await#0.6.0" into tink_await/0.6.0/haxelib | ||||
| -lib tink_core | ||||
| -lib tink_macro | ||||
| -lib tink_syntaxhub | ||||
| -cp ${HAXE_LIBCACHE}/tink_await/0.6.0/haxelib/src | ||||
| -D tink_await=0.6.0 | ||||
| --macro tink.await.Await.use() | ||||
| @ -1,3 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_chunk#0.4.0" into tink_chunk/0.4.0/haxelib | ||||
| -cp ${HAXE_LIBCACHE}/tink_chunk/0.4.0/haxelib/src | ||||
| -D tink_chunk=0.4.0 | ||||
| @ -1,3 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_core#2.0.2" into tink_core/2.0.2/haxelib | ||||
| -cp ${HAXE_LIBCACHE}/tink_core/2.0.2/haxelib/src | ||||
| -D tink_core=2.0.2 | ||||
| @ -1,7 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_http#0.10.0" into tink_http/0.10.0/haxelib | ||||
| -lib http-status | ||||
| -lib tink_anon | ||||
| -lib tink_io | ||||
| -lib tink_url | ||||
| -cp ${HAXE_LIBCACHE}/tink_http/0.10.0/haxelib/src | ||||
| -D tink_http=0.10.0 | ||||
| @ -1,5 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_io#0.9.0" into tink_io/0.9.0/haxelib | ||||
| -lib tink_chunk | ||||
| -lib tink_streams | ||||
| -cp ${HAXE_LIBCACHE}/tink_io/0.9.0/haxelib/src | ||||
| -D tink_io=0.9.0 | ||||
| @ -1,4 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_json#0.11.0" into tink_json/0.11.0/haxelib | ||||
| -lib tink_typecrawler | ||||
| -cp ${HAXE_LIBCACHE}/tink_json/0.11.0/haxelib/src | ||||
| -D tink_json=0.11.0 | ||||
| @ -1,4 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_macro#1.0.0" into tink_macro/1.0.0/haxelib | ||||
| -lib tink_core | ||||
| -cp ${HAXE_LIBCACHE}/tink_macro/1.0.0/haxelib/src | ||||
| -D tink_macro=1.0.0 | ||||
| @ -1,3 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_priority#0.1.4" into tink_priority/0.1.4/haxelib | ||||
| -cp ${HAXE_LIBCACHE}/tink_priority/0.1.4/haxelib/src | ||||
| -D tink_priority=0.1.4 | ||||
| @ -1,5 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_querystring#0.7.0" into tink_querystring/0.7.0/haxelib | ||||
| -lib tink_typecrawler | ||||
| -lib tink_url | ||||
| -cp ${HAXE_LIBCACHE}/tink_querystring/0.7.0/haxelib/src | ||||
| -D tink_querystring=0.7.0 | ||||
| @ -1,3 +0,0 @@ | ||||
| # @install: lix --silent download "gh://github.com/haxetink/tink_spatial#fb0d0a02ceed49325709215b5da0062fd8316c62" into tink_spatial/0.1.0/github/fb0d0a02ceed49325709215b5da0062fd8316c62 | ||||
| -cp ${HAXE_LIBCACHE}/tink_spatial/0.1.0/github/fb0d0a02ceed49325709215b5da0062fd8316c62/src | ||||
| -D tink_spatial=0.1.0 | ||||
| @ -1,7 +0,0 @@ | ||||
| # @install: lix --silent download "gh://github.com/haxetink/tink_sql#3b8fef55ba9153b78c07e8722a76d077f4d40cb8" into tink_sql/0.0.0-alpha.0/github/3b8fef55ba9153b78c07e8722a76d077f4d40cb8 | ||||
| -lib tink_macro | ||||
| -lib tink_spatial | ||||
| -lib tink_streams | ||||
| -lib tink_url | ||||
| -cp ${HAXE_LIBCACHE}/tink_sql/0.0.0-alpha.0/github/3b8fef55ba9153b78c07e8722a76d077f4d40cb8/src | ||||
| -D tink_sql=0.0.0-alpha.0 | ||||
| @ -1,6 +0,0 @@ | ||||
| # @install: lix --silent download "gh://github.com/haxetink/tink_streams#c51ff28d69ea844995696f10575d1a150ce47159" into tink_streams/0.3.3/github/c51ff28d69ea844995696f10575d1a150ce47159 | ||||
| -lib tink_core | ||||
| -cp ${HAXE_LIBCACHE}/tink_streams/0.3.3/github/c51ff28d69ea844995696f10575d1a150ce47159/src | ||||
| -D tink_streams=0.3.3 | ||||
| # temp for development, delete this file when pure branch merged | ||||
| -D pure | ||||
| @ -1,4 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_stringly#0.4.0" into tink_stringly/0.4.0/haxelib | ||||
| -lib tink_core | ||||
| -cp ${HAXE_LIBCACHE}/tink_stringly/0.4.0/haxelib/src | ||||
| -D tink_stringly=0.4.0 | ||||
| @ -1,6 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_syntaxhub#0.5.0" into tink_syntaxhub/0.5.0/haxelib | ||||
| -lib tink_macro | ||||
| -lib tink_priority | ||||
| -cp ${HAXE_LIBCACHE}/tink_syntaxhub/0.5.0/haxelib/src | ||||
| -D tink_syntaxhub=0.5.0 | ||||
| --macro tink.SyntaxHub.use() | ||||
| @ -1,4 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_typecrawler#0.7.0" into tink_typecrawler/0.7.0/haxelib | ||||
| -lib tink_macro | ||||
| -cp ${HAXE_LIBCACHE}/tink_typecrawler/0.7.0/haxelib/src | ||||
| -D tink_typecrawler=0.7.0 | ||||
| @ -1,5 +0,0 @@ | ||||
| # @install: lix --silent download https://github.com/haxetink/tink_url/archive/7c98a2ea212c3a2f8d9ff41c1450eae98eee812f.tar.gz into tink_url/0.3.1/github/7c98a2ea212c3a2f8d9ff41c1450eae98eee812f | ||||
| -D tink_url=0.3.1 | ||||
| -cp ${HAXESHIM_LIBCACHE}/tink_url/0.3.1/github/7c98a2ea212c3a2f8d9ff41c1450eae98eee812f/src | ||||
| 
 | ||||
| -lib tink_stringly | ||||
| @ -1,6 +0,0 @@ | ||||
| # @install: lix --silent download "haxelib:/tink_web#0.3.0" into tink_web/0.3.0/haxelib | ||||
| -lib tink_http | ||||
| -lib tink_json | ||||
| -lib tink_querystring | ||||
| -cp ${HAXE_LIBCACHE}/tink_web/0.3.0/haxelib/src | ||||
| -D tink_web=0.3.0 | ||||
| @ -1,10 +1,9 @@ | ||||
| import html.WebDocument; | ||||
| import html.Document; | ||||
| import tink.http.containers.*; | ||||
| import tink.http.Response; | ||||
| import tink.web.routing.*; | ||||
| import haxe.Json; | ||||
| import tink.sql.drivers.Sqlite; | ||||
| import db.Db; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| typedef T_project = { | ||||
| @ -30,40 +29,16 @@ class Server { | ||||
| } | ||||
| 
 | ||||
| class Root { | ||||
|     public function new() {} | ||||
|     public function new() {}     | ||||
| 
 | ||||
| 
 | ||||
|     @:get('/') | ||||
|     @:produces('text/html') | ||||
|     public function root(){ | ||||
|         //return "yeet"; | ||||
|         return WebDocument.render(); | ||||
|     } | ||||
| 
 | ||||
|     @:get('/test') | ||||
|     @:produces('text/html') | ||||
|     @async | ||||
|     public function create(){ | ||||
|         //return "yeet"; | ||||
|         var yeet = "yote"; | ||||
|         var driver = new tink.sql.drivers.Sqlite(); | ||||
|         @await var db = new Db('daba2', driver); | ||||
|         @await var one = db.User.create(); | ||||
|         @await var two = db.User.insertOne({ | ||||
|             id: cast null, | ||||
|             name: 'Alice', | ||||
|             email: 'alice@example.com', | ||||
|             password: 'jew' | ||||
|         }); | ||||
|         @await var three = db.User.select({name: User.name, email: User.email}).where(User.email == 'alice@example.com').first().next(function(row) { | ||||
|             trace(row.name);return ""; | ||||
|         }); | ||||
|         // trace(@await one); | ||||
|         // trace(@await two); | ||||
|         trace(@await three); | ||||
|         return '$yeet'; | ||||
|         return Document.render(); | ||||
|     } | ||||
|      | ||||
|     @:sub('/projects') | ||||
|     @:produces('application/json') | ||||
|     public function projects() | ||||
|         return new Projects(); | ||||
|      | ||||
| @ -74,7 +49,6 @@ class Root { | ||||
|         var strout:String = tink.Json.stringify(greeting); | ||||
|         return strout; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| class Projects { | ||||
|  | ||||
| @ -1,10 +0,0 @@ | ||||
| package db; | ||||
| 
 | ||||
| import tink.sql.drivers.sys.Sqlite; | ||||
| import tink.sql.drivers.MySql; | ||||
| import db.Db; | ||||
| 
 | ||||
| class Connection{ | ||||
|     private static var driver = new tink.sql.drivers.Sqlite(); | ||||
|     public static var db = new Db('daba', driver); | ||||
| } | ||||
| @ -1,17 +0,0 @@ | ||||
| package db; | ||||
| 
 | ||||
| // import tink.sql.drivers.Sqlite; | ||||
| //import tink.sql.Database; | ||||
| import tink.sql.Types; | ||||
| import model.User; | ||||
| 
 | ||||
| // import db.Models.User; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| typedef Db = tink.sql.Database<Def>; | ||||
| @:tables(User) | ||||
| interface Def extends tink.sql.DatabaseDefinition { | ||||
|   //@:procedure var func:Int->{x:Int, point:tink.s2d.Point}; | ||||
|   //@:table('user') var UserAlias:User; | ||||
| } | ||||
| @ -1,11 +0,0 @@ | ||||
| package db; | ||||
| 
 | ||||
| import tink.sql.Types; | ||||
| 
 | ||||
| 
 | ||||
| typedef User = { | ||||
|     @:autoIncrement @:primary public var id(default, null):Id<User>; | ||||
|     var name:VarChar<255>; | ||||
|     @:unique var email:VarChar<255>; | ||||
|     var password:VarChar<255>; | ||||
| } | ||||
| @ -1,14 +1,8 @@ | ||||
| package html; | ||||
| 
 | ||||
| //import tink.web.macros.Routing; | ||||
| import tink.web.routing.*; | ||||
| import tink.web.routing.Router; | ||||
| 
 | ||||
| 
 | ||||
| class WebDocument{ | ||||
| class Document{ | ||||
|     public static function render():String | ||||
|     { | ||||
|          | ||||
|         var docroot:Tag = new Tag("html"); | ||||
|         var head:Tag = new Tag("head"); | ||||
|         var body:Tag = new Tag("body"); | ||||
| @ -1,11 +0,0 @@ | ||||
| package model; | ||||
| 
 | ||||
| import tink.sql.Types; | ||||
| 
 | ||||
| 
 | ||||
| typedef User = { | ||||
|     @:autoIncrement @:primary public var id(default, null):Id<User>; | ||||
|     public var name:VarChar<50>; | ||||
|     public var email:VarChar<50>; | ||||
|     public var password:VarChar<50>; | ||||
| } | ||||
| @ -1,9 +0,0 @@ | ||||
| package model.cctweaked; | ||||
| 
 | ||||
| import tink.sql.Types; | ||||
| 
 | ||||
| typedef HTurtle = { | ||||
|   @:autoIncrement @:primary public var id(default, null):Id<HTurtle>; | ||||
|   public var name:VarChar<50>; | ||||
|   public var password:VarChar<50>; | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user