Guest User

Untitled

a guest
Jul 27th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1.  
  2. inUser := 's1'.
  3. inPass := 'tet'.
  4.  
  5. login := Login new database: PostgreSQLPlatform new;
  6. username: 'postgres';
  7. password: 'sticky';
  8. connectString: '127.0.0.1_CS2340'.
  9. accessor := DatabaseAccessor forLogin: login.
  10. accessor login.
  11.  
  12. session := GlorpSession new.
  13. session system: (TablesDescriptor forPlatform: login database).
  14. session accessor: accessor.
  15.  
  16. foundStudent := session readOneOf: Student where: [:st | st username = inUser AND: st pass = inPass].
  17. accessor logout.
Add Comment
Please, Sign In to add comment