Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. #r "./packages/RethinkDb.Driver.2.3.19/lib/net45/RethinkDb.Driver.dll"
  2.  
  3. open System
  4. open RethinkDb.Driver
  5. open RethinkDb.Driver.Ast
  6. open RethinkDb.Driver.Net
  7.  
  8. // connecting across network to RethinkDB running on Mac with
  9. // rethinkdb --bind all
  10. let r = RethinkDb.Driver.RethinkDB.R;
  11. let conn = r.Connection().Hostname("192.168.1.6").Port(28015).Timeout(60).Connect()
  12. let pNum = conn.Port
  13. let hName = conn.Hostname
  14.  
  15. (* the above provides results below in FSI, so all good so far...
  16. --> Referenced 'F:\Dropbox\_src\_common\fsharp\rethinkdb\test1\./packages/RethinkDb.Driver.2.3.19/lib/net45/RethinkDb.Driver.dll'
  17.  
  18. Binding session to 'C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics\Newtonsoft.Json.dll'...
  19. val r : RethinkDb.Driver.RethinkDB
  20. val conn : RethinkDb.Driver.Net.Connection
  21. val pNum : int = 28015
  22. val hName : string = "192.168.1.6"
  23.  
  24. *)
  25.  
  26. // TODO: below results in table creation, but but logging failure:
  27. let tableCreateRes = r.Db("test").TableCreate("authors").Run(conn)
  28.  
  29. (*
  30. >
  31. System.IO.FileNotFoundException: Could not load file or assembly 'Common.Logging.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e' or one of its dependencies. The system cannot find the file specified.
  32. File name: 'Common.Logging.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e'
  33. at RethinkDb.Driver.Log.Trace(String msg)
  34. at RethinkDb.Driver.Net.SocketWrapper.SendQuery(Int64 token, String json, Boolean awaitResponse, CancellationToken cancelToken)
  35. at RethinkDb.Driver.Net.Connection.SendQuery(Query query, CancellationToken cancelToken, Boolean awaitResponse)
  36. at RethinkDb.Driver.Net.Connection.<RunQueryAsync>d__51`1.MoveNext()
  37. --- End of stack trace from previous location where exception was thrown ---
  38. at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
  39. at RethinkDb.Driver.Utils.TaskHelper.WaitSync[T](Task`1 task)
  40. at RethinkDb.Driver.Ast.ReqlAst.Run[T](IConnection conn, Object runOpts)
  41. at <StartupCode$FSI_0003>.$FSI_0003.main@() in F:\Dropbox\_src\_common\fsharp\rethinkdb\test1\Script.fsx:line 30
  42.  
  43. WRN: Assembly binding logging is turned OFF.
  44. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
  45. Note: There is some performance penalty associated with assembly bind failure logging.
  46. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
  47.  
  48. Stopped due to error
  49. >
  50.  
  51.  
  52. *)
  53. // let now = r.Now().Run(conn)
  54. // let dbList = r.DbList().Run(conn)
  55. // let info = r.Db("test").Table("ticks").Info().Run(conn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement