Example #1
0
func (vm *VM) Extract_variable_as_int64(variable_name string) (int64, error) {
	/*Extract a variable from the VM after if have been executed
	If something went wrong return nil
	*/
	var unqlite_value *Unqlite_value
	unqlite_value = vm.Unqlite_vm_extract_variable(variable_name)
	if !unqlite_value_ok(unqlite_value) {
		return 0, nil
	}

	res := int64(C.unqlite_value_to_int64(unqlite_value.unqlite_value))
	return res, GlobaLError("OK")
}
Example #2
0
func (v *Value) ToInt64() int64 {
	i := C.unqlite_value_to_int64(v.v)
	return int64(i)
}